forked from emilhe/dash-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (79 loc) · 2.27 KB
/
python-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
78
79
80
81
82
83
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Unit tests
on:
push:
branches: [ master ]
paths-ignore:
- '.github/**'
- '.gitignore'
- '.gitattributes'
- '.vscode/**'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'README.md'
- 'TODO.md'
- 'lgtm.yml'
pull_request:
branches: [ master ]
paths-ignore:
- '.github/**'
- '.gitignore'
- '.gitattributes'
- '.vscode/**'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
- 'README.md'
- 'TODO.md'
- 'lgtm.yml'
concurrency:
group: unit-tests-${{ github.head_ref }}-1
cancel-in-progress: true
jobs:
test:
name: Unit-Tests
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- { python: "3.10", poetry: "1.6.1", node: 'lts/*' }
- { python: "3.11", poetry: "1.6.1", node: 'lts/*' }
env:
TEST_CYCLE_BREAKER_ALLOWED_ERRORS: 7
steps:
- uses: actions/checkout@v4.1.1
with:
token: ${{ SECRETS.GITHUB_TOKEN }}
- uses: nanasess/setup-chromedriver@v2.2.0
- uses: actions/setup-node@v4.0.0
with:
node-version: '${{ matrix.node }}'
- name: Set up Python
uses: actions/setup-python@v4.7.1
with:
python-version: '${{ matrix.python }}'
- name: Install poetry
uses: Gr1N/setup-poetry@v8
with:
poetry-version: '${{ matrix.poetry }}'
- name: Cache poetry
id: cached-poetry-dependencies
uses: actions/cache@v3.3.2
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ matrix.poetry }}-${{ hashFiles('poetry.lock') }}-python-${{ matrix.python }}
- run: poetry --version
- name: Install dependencies
run: |
poetry install --all-extras
poetry run npm install -g npm@latest
- name: Build components
run: |
poetry run npm install | echo "Ignore npm install error"
poetry run npm run build_no_r
- name: Test with pytest
run: |
poetry run pytest --cov=dash_extensions tests