-
Notifications
You must be signed in to change notification settings - Fork 166
48 lines (39 loc) · 1.28 KB
/
ci-unit_tests.yaml
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
name: CI Unit Tests
on:
pull_request:
jobs:
ci_pytest:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y perl libxml-libxml-perl libxml-libxslt-perl libdatetime-perl
python -m pip install --upgrade pip
pip install pytest wxflow
# If you have a requirements.txt file, you can install all dependencies using:
# pip install -r requirements.txt
- name: Install Rocoto
run: |
git clone https://github.com/christopherwharrop/rocoto.git
cd rocoto
./INSTALL
echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Run tests
run: python -m pytest ci/scripts/tests/test_rocotostat.py -v --junitxml ci/scripts/tests/test-results.xml
- name: Publish Test Results
if: always()
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: ci/scripts/tests/test-results.xml
job_summary: true
comment_mode: off