mirror of
https://github.com/anoma/juvix.git
synced 2025-01-04 13:42:04 +03:00
Add pre-commit, new policy for PRs and removal of dev in the CI#118)
* Remove dev. Add valid req.types for PRs. Add Concurrency * [ci] Add pre-commit check * [ci] w.i.p fixing when ci should trigger * [ci] minor fix * [ci] Fix pre-commit check
This commit is contained in:
parent
f987ef1c13
commit
24d741922e
50
.github/workflows/ci.yml
vendored
50
.github/workflows/ci.yml
vendored
@ -1,14 +1,28 @@
|
||||
name: MiniJuvix CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main , dev ]
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- dev
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
- synchronize
|
||||
- ready_for_review
|
||||
- review_requested
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
not-a-draft:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.pull_request.draft == true
|
||||
steps:
|
||||
- name: Fails in order to indicate that pull request needs to be marked as
|
||||
ready to review.
|
||||
run: exit 1
|
||||
|
||||
ormolu:
|
||||
runs-on: ubuntu-latest
|
||||
@ -38,6 +52,36 @@ jobs:
|
||||
path: '["src/", "app/", "test/"]'
|
||||
fail-on: warning
|
||||
|
||||
pre-commit:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
- uses: pre-commit/action@v2.0.3
|
||||
with:
|
||||
extra_args:
|
||||
trailing-whitespace --all-files
|
||||
- uses: pre-commit/action@v2.0.3
|
||||
with:
|
||||
extra_args:
|
||||
end-of-file-fixer --all-files
|
||||
- uses: pre-commit/action@v2.0.3
|
||||
with:
|
||||
extra_args:
|
||||
check-yaml --all-files
|
||||
- uses: pre-commit/action@v2.0.3
|
||||
with:
|
||||
extra_args:
|
||||
check-added-large-files --all-files
|
||||
- uses: pre-commit/action@v2.0.3
|
||||
with:
|
||||
extra_args:
|
||||
check-case-conflict --all-files
|
||||
- uses: pre-commit/action@v2.0.3
|
||||
with:
|
||||
extra_args:
|
||||
mixed-line-ending --all-files
|
||||
|
||||
build:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
|
@ -15,7 +15,7 @@ repos:
|
||||
- id: mixed-line-ending
|
||||
|
||||
- repo: https://github.com/heliaxdev/minijuvix
|
||||
rev: a54abcd6a50518476ee75b329e245c3341d02341
|
||||
rev: f987ef1c13e75e6ed60e8e85c8afecb3f485e224
|
||||
hooks:
|
||||
- id: ormolu
|
||||
- id: hlint
|
||||
|
Loading…
Reference in New Issue
Block a user