forked from adimoldovan/pytest-bk-test-analytics
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 992 Bytes
/
pytest.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
name: Test
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
inputs:
workers:
description: number of workers
type: string
default: '0'
jobs:
run-tests:
name: "Run tests"
runs-on: ubuntu-latest
env:
BUILDKITE_ANALYTICS_TOKEN: ${{ secrets.BUILDKITE_ANALYTICS_TOKEN }}
BUILDKITE_ANALYTICS_DEBUG_ENABLED: 'TRUE'
BUILDKITE_ANALYTICS_MESSAGE: 'Test run with ${{inputs.workers}} workers'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Python
uses: actions/[email protected]
with:
python-version: '3.12'
- name: Install project
run: |
python3 -m pip install --user pipenv
python3 -m pipenv --python 3
python3 -m pipenv install
- name: Run tests
env:
WORKERS: ${{inputs.workers || '1'}}
run: python3 -m pipenv run pytest -n=${{env.WORKERS}} -v --capture=no