Skip to content

BUILD-3093 Setup a GitHub action to enforce pre-commit at CI level #67

BUILD-3093 Setup a GitHub action to enforce pre-commit at CI level

BUILD-3093 Setup a GitHub action to enforce pre-commit at CI level #67

Workflow file for this run

on:
pull_request:
push:
branches: [master]
jobs:
it-tests-use-config-path:
name: "IT Test - custom config-path"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Test pre-commit action on this same repository using a custom config-path
id: reuse-step
uses: ./
with:
config-path: '.github/tests/resources/.pre-commit-config.yaml'
extra-args: '--all-files'
- name: json
run: |
echo $JSON
env:
JSON: ${{ toJSON(steps) }}
- name: Reuse output
run: |
echo "Pre-commit logs :"
echo "${{ steps.reuse-step.outputs.logs }}"
shell: bash
it-tests-use-default-config-path:
name: "IT Test - default inputs values"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Test pre-commit action on this same repository using default input values
uses: ./
it-tests-use-extra-args-default:
name: "IT Test - custom extra-args"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Test pre-commit action on this same repository using --help extra-args
uses: ./
with:
extra-args: --help