-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (69 loc) · 2.24 KB
/
test_package.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
67
68
69
70
71
72
73
# Test package every time
name: Test package
# Controls when the action will run.
# Trigger this code when a new release is published
on:
workflow_dispatch:
release:
types: [created]
pull_request:
push:
branches:
- main
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Checkout repo
uses: actions/checkout@v2
- name: Write utilix config
run: |
bash .github/scripts/create-utilix-config.sh
cp ~/.xenon_config ./
env:
RUNDB_API_URL: ${{ secrets.RUNDB_API_URL }}
RUNDB_API_USER: ${{ secrets.RUNDB_API_USER }}
RUNDB_API_PASSWORD: ${{ secrets.RUNDB_API_PASSWORD }}
XENT_URL: ${{ secrets.MONGO_URL }}
XENT_USER: ${{ secrets.MONGO_USER }}
XENT_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
XENT_DATABASE: ${{ secrets.MONGO_DATABASE }}
- name: Checkout cutax
uses: actions/checkout@v3
with:
repository: XENONnT/cutax
ssh-key: ${{ secrets.CUTAX_DEPLOY_KEY }}
path: cutax
ref: master
fetch-depth: 0
- name: Install python dependencies
uses: py-actions/py-dependency-install@v2
- name: Install requirements
run: |
pip install -r extra_requirements/requirements-tests.txt
pip install ./cutax
- name: Install saltax
run: python setup.py develop
- name: Install pytest and hypothesis
run: pip install pytest hypothesis flake8 pytest-cov coverage
- name: Test package
env:
HAVE_ACCESS_TO_SECTETS: ${{ secrets.RUNDB_API_URL }}
if: env.HAVE_ACCESS_TO_SECTETS != null
run: pytest --cov=saltax --cov-report=xml
- name: Test coverage scan
env:
HAVE_ACCESS_TO_SECTETS: ${{ secrets.RUNDB_API_URL }}
if: env.HAVE_ACCESS_TO_SECTETS != null
run: coverage run --source saltax setup.py test
- name: Coverage report
env:
HAVE_ACCESS_TO_SECTETS: ${{ secrets.RUNDB_API_URL }}
if: env.HAVE_ACCESS_TO_SECTETS != null
run: coverage report
- name: goodbye
run: echo goodbye