|
1 | 1 | # This is a workflow for Unit, Integration, and Regression Tests |
2 | 2 |
|
3 | | -name: Unit, Integration and Regression Tests |
| 3 | +name: CI |
4 | 4 |
|
5 | 5 | on: |
6 | 6 | push: |
|
11 | 11 |
|
12 | 12 | jobs: |
13 | 13 | unit_and_integration_tests: |
14 | | - strategy: |
15 | | - matrix: |
16 | | - python-version: [3.11] |
17 | | - os: [ubuntu-latest] |
18 | | - runs-on: ${{ matrix.os }} |
| 14 | + runs-on: ubuntu-latest |
19 | 15 | steps: |
20 | 16 | - uses: actions/checkout@v3 |
21 | | - - uses: actions/setup-python@v4 |
22 | | - with: |
23 | | - python-version: ${{ matrix.python-version }} |
24 | | - - name: Making virtual environment, linting |
25 | | - run: | |
26 | | - make testenv |
| 17 | + - uses: ./.github/actions/python-poetry-env |
27 | 18 | - name: Downloading test data |
28 | 19 | run: | |
29 | 20 | make get_test_data |
30 | 21 | - name: Running tests |
31 | | - run: | |
32 | | - source .venv/bin/activate |
33 | | - coverage run --source=jwave -m pytest -xvs --ignore=tests/regression_tests |
| 22 | + run: poetry run coverage run --source=jwave -m pytest -xvs --ignore=tests/regression_tests |
34 | 23 | - name: "Upload coverage data for unit and integration tests" |
35 | 24 | uses: actions/upload-artifact@v2 |
36 | 25 | with: |
37 | 26 | name: coverage-unit |
38 | 27 | path: ./.coverage |
39 | 28 |
|
40 | 29 | regression_tests: |
41 | | - strategy: |
42 | | - matrix: |
43 | | - python-version: [3.11] |
44 | | - os: [ubuntu-latest] |
45 | | - runs-on: ${{ matrix.os }} |
| 30 | + runs-on: ubuntu-latest |
46 | 31 | steps: |
47 | 32 | - uses: actions/checkout@v3 |
48 | | - - uses: actions/setup-python@v4 |
49 | | - with: |
50 | | - python-version: ${{ matrix.python-version }} |
51 | | - - name: Making virtual environment, linting |
52 | | - run: | |
53 | | - make testenv |
| 33 | + - uses: ./.github/actions/python-poetry-env |
54 | 34 | - name: Downloading test data |
55 | 35 | run: | |
56 | 36 | make get_test_data |
57 | 37 | - name: Running tests |
58 | | - run: | |
59 | | - source .venv/bin/activate |
60 | | - coverage run --source=jwave -m pytest -xvs ./tests/regression_tests |
| 38 | + run: poetry run coverage run --source=jwave -m pytest -xvs ./tests/regression_tests |
61 | 39 | - name: "Upload coverage data for regression tests" |
62 | 40 | uses: actions/upload-artifact@v2 |
63 | 41 | with: |
|
0 commit comments