Skip to content

Conditionalize config #204

Conditionalize config

Conditionalize config #204

Workflow file for this run

name: "CI"
on:
pull_request:
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: open-turo/actions-gha/lint@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# test action works running from the graph
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Pre-commit
uses: ./
test-pre-installed:
name: Test / Pre-commit exists
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v4
with:
python-version-file: ".python-version"
- name: Install pre-commit
run: |
# Install pre-commit
pip install pre-commit
- name: Pre-commit
uses: ./
# test-oss tries to run pre-commit against open source repositories not in
# open-turo to make sure this is usuable outside the org
test-oss:
name: Test / Open source
runs-on: ubuntu-latest
strategy:
matrix:
repos:
- google/uv-metrics
- localstack/localstack
- toml-lang/toml
- pre-commit/pre-commit
- terraform-aws-modules/terraform-aws-eks
- actions/starter-workflows
- github/codeql
- google/pre-commit-tool-hooks
- microsoft/superbenchmark
- nodejs/node-addon-examples
- python/peps
- hashicorp/copywrite
steps:
- uses: actions/checkout@v4
with:
repository: ${{ matrix.repos }}
- name: Pre-commit
# TODO: use a released version of this action
uses: open-turo/action-pre-commit@conditionalize-config