-
Notifications
You must be signed in to change notification settings - Fork 9
57 lines (54 loc) · 1.46 KB
/
nanopyx_oncall_mechanic.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
name: Test - Oncall
# does a quick test
on:
push:
branches: ["main"]
paths:
# only run if src or tests changes
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#onpushpull_requestpull_request_targetpathspaths-ignore
- "src/**"
- "tests/**"
- "setup.py"
- "noxfile.py"
- "pyproject.toml"
pull_request:
branches: ["main"]
# creates a button
workflow_dispatch:
inputs:
logLevel:
description: "Log level"
required: true
default: "warning"
type: choice
options:
- info
- warning
- debug
jobs:
test_on_ubuntu_container:
runs-on: [self-hosted, Ubuntu, Docker]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: |
3.9
3.10
3.11
- name: Run Nox Quick-Tests
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade nox
python -m nox --sessions test_source
env:
LOG_LEVEL: ${{ github.event.inputs.logLevel }}
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
files: coverage.xml # optional
flags: pytests # optional
fail_ci_if_error: false # optional (default = false)
verbose: true # optional (default = false)