-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (43 loc) · 1.51 KB
/
testDeploy.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
name: test-and-deploy
on: [push, pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']
name: Run unit tests with Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install bashi
run: |
pip install .
- name: run unit tests
run: python -m unittest discover -s tests
integration-tests:
needs: unit-tests
runs-on: ubuntu-latest
name: Run example/example.py as integration test
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.12
architecture: x64
- name: Install bashi
run: |
pip install .
- name: run integration test
run: python example/example.py
- name: copy example output for reproducible test
run: mv example/job.yaml example/first.yaml
- name: run example second time
run: python example/example.py
- name: compare result of example runs (should be equal)
run: diff example/job.yaml example/first.yaml