Skip to content

chore(deps): update pre-commit hook gauge-sh/tach-pre-commit to v0.25.1 #541

chore(deps): update pre-commit hook gauge-sh/tach-pre-commit to v0.25.1

chore(deps): update pre-commit hook gauge-sh/tach-pre-commit to v0.25.1 #541

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
inputs: {}
schedule:
# Weekly on Monday at 12:00 PM UTC
- cron: "0 12 * * 1"
env:
FORCE_COLOR: "1"
# renovate: datasource=pypi depName=schemathesis
SCHEMATHESIS_VERSION: "3.39.9"
# renovate: datasource=pypi depName=uv
UV_VERSION: "0.5.29"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
get-hub-data:
name: Get Hub Data
runs-on: ubuntu-24.04
continue-on-error: false
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
- uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
with:
version: ${{ env.UV_VERSION }}
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: meltano/hub
ref: main
path: meltano-hub
- run: uv run python -I build.py meltano-hub/_data
env:
ONLY_GROUP: build
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
name: hub-data
path: plugins.db
tests:
name: Test
runs-on: ubuntu-24.04
continue-on-error: false
needs: [get-hub-data]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
- uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
with:
version: ${{ env.UV_VERSION }}
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: hub-data
- run: uv run coverage run -m pytest -v
continue-on-error: true # Continue on error to combine coverage.
env:
ONLY_GROUP: tests
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
with:
include-hidden-files: true
name: coverage
path: .coverage.*
typing:
name: Type Checking
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
- uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
with:
version: ${{ env.UV_VERSION }}
- run: uv run mypy src tests
env:
ONLY_GROUP: typing
schemathesis:
name: Schemathesis Test
runs-on: ubuntu-24.04
needs: [get-hub-data]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: hub-data
- name: Start containers
run: docker compose up -d --build
- uses: schemathesis/action@e8c36caf1285d9c955e282cf71793837f92308a4 # v1.0.4
with:
schema: 'http://127.0.0.1:8000/openapi.json'
base-url: http://127.0.0.1:8000
api-name: meltano-hub-api
report: 'false'
args: '--experimental=openapi-3.1 --junit-xml=junit.xml'
version: ${{ env.SCHEMATHESIS_VERSION }}
- uses: mikepenz/action-junit-report@ee6b445351cd81e2f73a16a0e52d598aeac2197f # v5.3.0
if: success() || failure() # always run even if the previous step fails
with:
report_paths: junit.xml
- name: Stop containers
if: always()
run: docker compose down
coverage:
name: Coverage
runs-on: ubuntu-24.04
continue-on-error: false
needs: [tests]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: coverage
- uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355 # v5.2.2
with:
version: ${{ env.UV_VERSION }}
- name: Combine coverage
env:
ONLY_GROUP: tests
run: |
uv run coverage combine
uv run coverage html --skip-covered --skip-empty
# Report and write to summary.
uv run coverage report --format=markdown >> $GITHUB_STEP_SUMMARY
# Report again and fail if under 100%.
uv run coverage report --fail-under=100 --show-missing
- uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
if: failure()
with:
name: html-report
path: htmlcov