Skip to content

fix: use clean authoritative flag before checking it #414

fix: use clean authoritative flag before checking it

fix: use clean authoritative flag before checking it #414

Workflow file for this run

name: CI check
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
merge_group:
types: [checks_requested]
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: read
packages: read
jobs:
changes:
runs-on: ubuntu-24.04
if: ${{ !github.event.pull_request.draft }}
outputs:
python: ${{ steps.filter.outputs.python }}
go: ${{ steps.filter.outputs.go }}
docs: ${{ steps.filter.outputs.docs }}
lint: ${{ steps.filter.outputs.lint }}
steps:
- uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
- uses: dorny/paths-filter@61f87a10cd2c304679af17bb73ef192addf33c1c
id: filter
with:
filters: |
lint:
- 'src/**/*.py'
- 'pyproject.toml'
- 'tox.ini'
- 'setup.py'
- 'openapi.yaml'
- 'Makefile'
- 'utilities/**'
- 'src/**/*.go'
- 'src/**/go.mod'
- 'src/**/go.sum'
- 'src/**/Makefile'
python:
- 'src/**/*.py'
- 'utilities/generate_builders.py'
- 'utilities/run-py-tests-ci'
- 'pyproject.toml'
- 'tox.ini'
go:
- 'src/**/*.go'
- 'src/**/go.mod'
- 'src/**/go.sum'
docs:
- 'rtd-docs/**'
lint:
runs-on: ubuntu-24.04
needs: changes
if: >-
${{ !github.event.pull_request.draft && needs.changes.outputs.lint == 'true' }}
container:
image: ghcr.io/${{ github.repository }}-build-env:${{ github.event_name == 'merge_group' && 'master' || github.base_ref }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
- uses: ./.github/actions/ci-setup
- name: Run lint
run: |
su ubuntu -c "make lint"
test-python:
needs: changes
runs-on: ubuntu-24.04
if: >-
${{ !github.event.pull_request.draft && needs.changes.outputs.python == 'true' }}
container:
image: ghcr.io/${{ github.repository }}-build-env:${{ github.event_name == 'merge_group' && 'master' || github.base_ref }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
- uses: ./.github/actions/ci-setup
- name: Test
run: |
CACHE_DIR=/home/ubuntu/.cache/pip
su ubuntu -c "PIP_CACHE_DIR=$CACHE_DIR make test-py"
test-go:
needs: changes
runs-on: ubuntu-24.04
if: >-
${{ !github.event.pull_request.draft && needs.changes.outputs.go == 'true' }}
container:
image: ghcr.io/${{ github.repository }}-build-env:${{ github.event_name == 'merge_group' && 'master' || github.base_ref }}
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
- uses: ./.github/actions/ci-setup
- name: Test
run: |
su ubuntu -c "make test-go"
test-docs:
needs: changes
runs-on: ubuntu-24.04
if: >-
${{ !github.event.pull_request.draft && needs.changes.outputs.docs == 'true' }}
steps:
- uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98
with:
fetch-depth: 0
- name: Create venv
working-directory: "rtd-docs"
run: make install
- name: Lint markdown
working-directory: "rtd-docs"
run: make lint-md
- name: Test build
working-directory: "rtd-docs"
run: make html
ci-check:
runs-on: ubuntu-slim
if: always()
needs: [lint, test-python, test-go, test-docs]
steps:
- name: Check job results
if: needs.*.result == 'failure'
run: exit 1