Skip to content

neville/build

neville/build #111

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
# Ensure only one workflow instance runs at a time. For branches other than the
# default branch, cancel the pending jobs in the group. For the default branch,
# queue them up. This avoids cancelling jobs that are in the middle of deploying
# to production.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != format('refs/heads/{0}', github.event.repository.default_branch) }}
jobs:
check-go:
name: Check Go
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v3
- run: ./script/check.sh go
test-go:
name: Test Go
runs-on: ubuntu-latest-4-cores
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v3
- run: ./script/init.sh
- run: ./script/test.sh go
test-go-legacy-cog:
name: Test Go with legacy Cog
runs-on: ubuntu-latest-4-cores
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v3
- run: ./script/init.sh
- run: ./script/test.sh go -legacy-cog
build-python:
name: Build & verify python package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2
id: baipp
with:
path: ./python
outputs:
python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }}
check-python:
name: Check with Python ${{ matrix.python-version }}
needs: [build-python]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJson(needs.build-python.outputs.python-versions) }}
steps:
- run: echo 'UV_PYTHON=${{ matrix.python-version }}' | tee -a "${GITHUB_ENV}"
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v3
- run: ./script/check.sh python
test-python:
name: Test with Python ${{ matrix.python-version }}
needs: [build-python]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJson(needs.build-python.outputs.python-versions) }}
steps:
- run: echo 'UV_PYTHON=${{ matrix.python-version }}' | tee -a "${GITHUB_ENV}"
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v3
- run: ./script/init.sh
- run: ./script/test.sh python