-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (39 loc) · 1.11 KB
/
test.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
# 1. Name of workflow
name: Unit Tests
# 2. When to run workflow
on:
pull_request:
push:
branches:
- develop
merge_group:
# 3. Jobs to run (in parallel)
jobs:
# 3.1. Job name (internal)
test:
# 3.2. Job name (external)
name: Unit Tests
# 3.3. Runner OS (can be Windows, macOS, or Linux)
runs-on: ubuntu-latest
# 3.4. Sequential steps in job
steps:
# 3.4.1. Checkout code
- name: 🛎 Checkout
uses: actions/checkout@v3
# 3.4.2. Install and setup Python
- name: 🐍 Setup Python
uses: actions/setup-python@v4
with:
python-version-file: API/pyproject.toml
# cache: 'pip'
# 3.4.3. Install Poetry
- name: Install Poetry
run: |
pip install poetry
poetry --version
# Install dependencies (if any). They will be cached with saved for next time with the cache command above
- name: Install
run: pip install API/.
# 3.4.4. Run tests (execute arbitrary commands in shell)
- name: 🏃Run tests
run: python -m unittest discover -s API