Skip to content

Commit 2250d1c

Browse files
authored
Merge pull request #61 from chilli-axe/local-tool-rewrite
Desktop client rewrite
2 parents 864a439 + c0b43ab commit 2250d1c

25 files changed

+1942
-769
lines changed

.github/workflows/main.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# credit: https://data-dive.com/multi-os-deployment-in-cloud-using-pyinstaller-and-github-actions
2+
name: MPC Autofill Desktop Client
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
jobs:
9+
build:
10+
name: Build packages
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
include:
15+
- os: macos-latest
16+
TARGET: macos
17+
OUT_FILE_NAME: autofill
18+
- os: windows-latest
19+
TARGET: windows
20+
OUT_FILE_NAME: autofill.exe
21+
- os: ubuntu-latest
22+
TARGET: linux
23+
OUT_FILE_NAME: autofill
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: browser-actions/setup-chrome@latest
27+
- name: Set up Python 3.9
28+
uses: actions/setup-python@v2
29+
with:
30+
python-version: 3.9
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
cd autofill
35+
pip install -r requirements.txt
36+
- name: Run tests
37+
run: cd autofill/src && pytest tests.py
38+
- name: Build with pyinstaller for ${{ matrix.TARGET }}
39+
run: cd autofill && pyinstaller autofill.spec
40+
- name: Upload artifact
41+
uses: actions/upload-artifact@v2
42+
with:
43+
path: ./autofill/dist/${{ matrix.OUT_FILE_NAME }}
44+
name: autofill-${{ matrix.TARGET }}

.gitignore

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ cards/*
44

55
# Ignore pyinstaller stuff
66
__pycache__/*
7-
autofill.spec
87
build/*
98
dist/*
109

@@ -39,12 +38,6 @@ share/python-wheels/
3938
*.egg
4039
MANIFEST
4140

42-
# PyInstaller
43-
# Usually these files are written by a python script from a template
44-
# before PyInstaller builds the exe, so as to inject date/other infos into it.
45-
*.manifest
46-
*.spec
47-
4841
# Installer logs
4942
pip-log.txt
5043
pip-delete-this-directory.txt
@@ -167,4 +160,4 @@ jquery.ui.touch-punch.js
167160
MPCAutofill/client_secrets.json
168161
static
169162
*.db
170-
.env_prod
163+
.env_prod

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
repos:
2+
- repo: https://github.com/pycqa/isort
3+
rev: 5.9.0
4+
hooks:
5+
- id: isort
6+
name: isort (python)
7+
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v2.3.0
10+
hooks:
11+
- id: check-yaml
12+
- id: end-of-file-fixer
13+
- id: trailing-whitespace
14+
- repo: https://github.com/psf/black
15+
rev: 22.1.0
16+
hooks:
17+
- id: black
18+
additional_dependencies: ['click==8.0.4'] # https://github.com/psf/black/issues/2964

0 commit comments

Comments
 (0)