-
Notifications
You must be signed in to change notification settings - Fork 8
42 lines (40 loc) · 1.1 KB
/
unit-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
name: Unit tests
on:
push:
branches:
- main
- stage
- develop
pull_request:
types: [opened, reopened, synchronize]
branches:
- main
- stage
- develop
jobs:
build:
runs-on: ubuntu-latest
environment: ${{ github.base_ref == '' && github.ref_name || github.base_ref }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Print environment
run: |
echo ${{ github.base_ref == '' && github.ref_name || github.base_ref }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip pipenv wheel
pipenv install --dev
- name: Build wheel
run: |
pipenv run python -m build
- name: Run unit tests
# Re-enable when we implement secure workflow with secrets
# env:
# CTX_USERNAME: ${{ secrets.CTX_USERNAME }}
# CTX_PASSWORD: ${{ secrets.CTX_PASSWORD }}
run: |
pipenv run python -m unittest discover tests