-
Notifications
You must be signed in to change notification settings - Fork 55
39 lines (33 loc) · 961 Bytes
/
Copy pathpytest.yml
File metadata and controls
39 lines (33 loc) · 961 Bytes
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
# This workflow will run pytest in the repository directory
# This runs on pull request or on any push to the repository
# based on https://www.youtube.com/watch?v=uFcXrWT4f80
name: Run tests
on:
pull_request:
branches: ['main', 'semver2']
push:
branches: ['main', 'semver2']
release:
types: [prereleased, published]
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v3
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install pytest
pip install cryptography
- name: Test with pytest
env:
FERNET_KEY: ${{ secrets.FERNET_KEY }}
run: |
pytest tests/