-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpytest.yml
More file actions
48 lines (42 loc) · 1.24 KB
/
pytest.yml
File metadata and controls
48 lines (42 loc) · 1.24 KB
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
# Example Tusk test runner workflow for service with:
# - pytest unit tests
# - linting with black
# - single service (no appDir)
# Adapt to your environment accordingly.
name: Tusk Test Runner
on:
workflow_dispatch:
inputs:
runId:
description: "Tusk Run ID"
required: true
tuskUrl:
description: "Tusk server URL"
required: true
commitSha:
description: "Commit SHA to checkout"
required: true
jobs:
test-action:
name: Tusk Test Runner
runs-on: ubuntu-latest
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commitSha }}
- name: Install dependencies
run: pip install -r requirements.txt
- name: Start runner
id: test-action
uses: Use-Tusk/test-runner@v1
with:
runId: ${{ github.event.inputs.runId }}
tuskUrl: ${{ github.event.inputs.tuskUrl }}
commitSha: ${{ github.event.inputs.commitSha }}
authToken: ${{ secrets.TUSK_AUTH_TOKEN }}
testFramework: "pytest"
testFileRegex: "^tests/.*(test_.*|.*_test).py$"
lintScript: black {{ file }}
testScript: pytest {{ file }}