-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (49 loc) · 1.26 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
52
name: test
on:
push:
branches:
- "main"
- "dev"
- "feature/*"
permissions:
contents: read
jobs:
test:
name: test
runs-on: arc-gb
steps:
- uses: actions/checkout@v4
- name: Has uv
id: has_uv
run: |
if command -v uv &> /dev/null; then
echo "result=true" >> $GITHUB_OUTPUT
else
echo "result=false" >> $GITHUB_OUTPUT
fi
- name: Install uv
uses: astral-sh/setup-uv@v3
if: ${{ steps.has_uv.outputs.result == 'false' }}
- name: Setup project with uv
run: |
uv python find 3.12 || uv python install 3.12
uv venv
source .venv/bin/activate
uv sync --link-mode=copy
- name: Run pycheck-parallel
run: |
source .venv/bin/activate
./hacks/pycheck-parallel
- name: Run unit tests
run: |
source .venv/bin/activate
pytest tests --cov --cov-report=xml
- name: Run the entrypoints
run: |
source .venv/bin/activate
octotail --help
octotailx --help
- name: Upload test results to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}