-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.34 KB
/
run-tests.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
name: Run tests on different Python 🐍 versions and operating systems.
on:
push:
branches:
- main
jobs:
test:
name: Run Tests
strategy:
matrix:
os: [ ubuntu-latest]
python-version: [3.8]
runs-on: ${{ matrix.os }}
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'oracle'
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install pypa/build
run: >-
python -m pip install build --user
- name: Run pip install
run: pip install -r requirements.txt
- name: Run contract as tests with Specmatic Python
run: coverage run --branch -m pytest test -v -s --junitxml contract-test-reports/TEST-junit-jupiter.xml
- name: Publish contract test report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: '**/contract-test-reports/TEST-*.xml'
- name: Generate coverage report
run: coverage html -d coverage-report
- name: Upload coverage report
uses: actions/upload-artifact@v2
with:
name: coverage-report
path: coverage-report