-
Notifications
You must be signed in to change notification settings - Fork 127
55 lines (43 loc) · 1.3 KB
/
ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Ubuntu
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12.4'
cache: poetry
- name: Install dependencies
run: |
sudo apt-get install -qq swig libpcsclite-dev
poetry install
- name: Run pre-commit hooks
run: |
python -m pip install --upgrade pip
pip install pre-commit
pre-commit install
pre-commit run --all-files --verbose
- name: Run unit tests
run: poetry run pytest
- name: Run CLI
run: |
pip install .
ykman --version
[[ -z "$(ykman --version | grep -E "not found|missing")" ]]
- name: PyInstaller
run: |
poetry run pyinstaller ykman.spec
dist/ykman/ykman --version
[[ -z "$(dist/ykman/ykman --version | grep -E "not found|missing")" ]]
export REF=$(echo ${GITHUB_REF} | cut -d '/' -f 3)
mv dist/ykman dist/ykman-$REF
- name: Upload build
uses: actions/upload-artifact@v4
with:
name: ykman-builds-ubuntu
path: dist