Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Commit

Permalink
Update PR workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
cxmeel committed Mar 14, 2024
1 parent 6b6d340 commit 0256956
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 30 deletions.
30 changes: 0 additions & 30 deletions .github/workflows/auto-format.yml

This file was deleted.

55 changes: 55 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: auto-format

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

on:
pull_request:
types:
- opened
- synchronize

jobs:
perform-checks:
if: github.repository == github.event.pull_request.head.repo.full_name
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4

- uses: ok-nick/[email protected]
with:
cache: true

- name: Lint
run: selene src

- name: Ensure tests exist
run: lune run ensure-tests src

- name: Ensure version parity
run: lune run ensure-version-parity

format:
needs: perform-checks
runs-on: ubuntu-latest
timeout-minutes: 10

permissions:
contents: write

steps:
- uses: actions/checkout@v4

- uses: ok-nick/[email protected]
with:
cache: true

- name: Format files
run: lune run format-files src

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Auto-format files"

0 comments on commit 0256956

Please sign in to comment.