mirror of
https://github.com/ivuorinen/f2b.git
synced 2026-01-26 11:24:00 +00:00
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
79 lines
2.3 KiB
YAML
79 lines
2.3 KiB
YAML
---
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
name: Lint PR Code Base
|
|
|
|
on:
|
|
pull_request:
|
|
branches: [master, main]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
Linter:
|
|
name: PR Lint
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
permissions:
|
|
statuses: write
|
|
contents: read
|
|
packages: read
|
|
issues: write # Used by ivuorinen/actions/pr-lint
|
|
pull-requests: write # Used by ivuorinen/actions/pr-lint
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
|
with:
|
|
node-version: 24.x
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
cache-dependency-path: go.sum
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
|
|
with:
|
|
python-version: "3.x"
|
|
|
|
- name: Cache pre-commit
|
|
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
|
|
with:
|
|
path: ~/.cache/pre-commit
|
|
key: ${{ runner.os }}-precommit-${{ hashFiles('.pre-commit-config.yaml') }}
|
|
|
|
- name: Install pre-commit tooling
|
|
shell: bash
|
|
run: |
|
|
make dev-deps
|
|
|
|
- name: Run pre-commit
|
|
uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
|
|
with:
|
|
extra_args: --all-files
|
|
|
|
- name: Run integration tests and collect coverage
|
|
run: |
|
|
# Run all tests with coverage collection for PR analysis
|
|
go test -race -covermode=atomic -coverprofile=coverage.out ./...
|
|
|
|
- name: Upload coverage report
|
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
|
with:
|
|
name: coverage-report
|
|
path: coverage.out
|
|
|
|
- name: Run PR Lint
|
|
# Custom PR linting action that performs additional PR-specific checks
|
|
# https://github.com/ivuorinen/actions
|
|
uses: ivuorinen/actions/pr-lint@ff0ca4bc920c518b2ce2dc20c5e5a6e95f76dee0 # v2025.11.02
|