-
-
Notifications
You must be signed in to change notification settings - Fork 37
54 lines (52 loc) · 1.35 KB
/
build.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
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-latest, macOS-11]
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version-file: pyproject.toml
cache: 'poetry'
- name: Create virtualenv
shell: bash
run: |
python -m venv venv
- name: Install dependencies
shell: bash
run: |
pipx install poetry==1.3.2 # due to: https://github.com/python-poetry/poetry/issues/7611
source venv/bin/activate || source venv/Scripts/activate
poetry install
- name: Run tests
shell: bash
run: |
source venv/bin/activate || source venv/Scripts/activate
make test
- name: Package
shell: bash
run: |
source venv/bin/activate || source venv/Scripts/activate
make package
- name: Test package
shell: bash
run: |
dist/aw-watcher-afk/aw-watcher-afk --help
- name: Upload package
uses: actions/upload-artifact@v2
with:
name: aw-watcher-afk-${{ runner.os }}
path: dist/aw-watcher-afk