Skip to content

Commit

Permalink
Run test workflow only once in pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
OliverStolzBO committed Feb 20, 2024
1 parent 5c28c03 commit 8c0c350
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Tests

on:
on:
push:
branches:
- 'main'
paths:
- 'pfdl_scheduler/**'
- 'tests/**'
Expand Down Expand Up @@ -33,16 +35,16 @@ jobs:
sudo apt -qq update
sudo apt -qq install -y graphviz
pip3 install -r requirements.txt
pip3 install unittest-xml-reporting --upgrade
pip3 install unittest-xml-reporting --upgrade
- name: Run Unit Tests
run: python3 -m xmlrunner discover -s tests/unit_test -v -o tmp/build/unittest-reports

- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: Unit Test results
path: tmp/build/unittest-reports/*.xml

integration-tests:
name: Integration Tests
runs-on: ubuntu-22.04
Expand All @@ -58,7 +60,7 @@ jobs:
sudo apt -qq update
sudo apt -qq install -y graphviz
pip3 install -r requirements.txt
pip3 install unittest-xml-reporting --upgrade
pip3 install unittest-xml-reporting --upgrade
- name: Run Unit Tests
run: python3 -m xmlrunner discover -s tests/integration_tests -v -o tmp/build/integrationtest-reports
Expand Down

0 comments on commit 8c0c350

Please sign in to comment.