-
Notifications
You must be signed in to change notification settings - Fork 55
66 lines (57 loc) · 1.64 KB
/
tests-windows.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
name: tests
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
workflow_dispatch:
jobs:
tests:
name: '${{ matrix.os }}:python-${{ matrix.python-version }}'
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2019, windows-2022]
python-version: ['3.6', 3.8', '3.9', '3.10', '3.11']
fail-fast: false
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
id: setup_python
uses: actions/setup-python@v4
with:
activate-environment: vplanet
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
- name: Install
id: install
if: steps.setup_python.outcome == 'success'
shell: bash -l {0}
run: |
python -m pip install -U pip
python -m pip install -e .
sudo apt install lcov
- name: Run tests and generate coverage
if: steps.install.outcome == 'success'
shell: bash -l {0}
run: |
make coverage
- name: Get unique id
id: unique-id
env:
STRATEGY_CONTEXT: ${{ toJson(strategy) }}
run: |
export JOB_ID=`echo $STRATEGY_CONTEXT | md5sum`
echo "::set-output name=id::$JOB_ID"
- name: Publish unit test results
uses: EnricoMi/publish-unit-test-result-action/composite@v2
if: always()
with:
files: junit/test-*.xml
comment_mode: update last
- name: CodeCov
uses: codecov/[email protected]
with:
files: ./.coverage