Skip to content

test: wire unit tests into build pipeline #97

test: wire unit tests into build pipeline

test: wire unit tests into build pipeline #97

Workflow file for this run

name: test
on:
push:
branches:
- "main"
- "dev"
- "feature/*"
permissions:
contents: read
jobs:
test:
name: test
runs-on: arc-octotail
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 }}