-
Notifications
You must be signed in to change notification settings - Fork 3
77 lines (75 loc) · 2.08 KB
/
test.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: okonomiyaki
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
strategy:
matrix:
python-version: [3.6, 3.8, 3.11, 3.12]
os: [ubuntu-20.04, macos-12, macos-latest, windows-2019]
exclude:
- os: macos-latest
python-version: 3.6
runs-on: ${{ matrix.os }}
needs: code-lint
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install okonomiyaki
run: python -m pip install -e .
- name: Install test dependencies
run: python -m pip install -e .[test] coverage
- name: Test without dependencies
run: |
coverage run -p -m haas okonomiyaki.versions
- name: Test with all dependencies
run: |
python -m pip install -e .[all]
coverage run -p -m haas okonomiyaki
- name: Upload Coverage info
uses: actions/upload-artifact@v4
with:
name: coverage-${{matrix.os}}-${{matrix.python-version}}
path: coverage.*
coverage:
runs-on: ubuntu-latest
needs: tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download coverage artifacts
uses: actions/download-artifact@v4
with:
pattern: coverage-*
merge-multiple: true
- name: Install coverage
run: pip install coverage
- name: Generate coverage report
run: |
pip install -e .
coverage combine
coverage report
coverage html
- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: htmlcov/*
code-lint:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.6
uses: actions/setup-python@v5
with:
python-version: 3.6
- name: Install flake8
run: python -m pip install flake8
- name: Lint codebase
run: python -m flake8 okonomiyaki/