-
Notifications
You must be signed in to change notification settings - Fork 2
45 lines (34 loc) · 1007 Bytes
/
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
# 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'
# 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.3. Run tests (execute arbitrary commands in shell)
- name: 🏃Run tests
run: python -m unittest discover -s API