1
1
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:
Jonathan Cubides 2022-05-20 10:45:03 +02:00 committed by GitHub
parent f987ef1c13
commit 24d741922e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 48 additions and 4 deletions

View File

@ -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:

View File

@ -15,7 +15,7 @@ repos:
- id: mixed-line-ending
- repo: https://github.com/heliaxdev/minijuvix
rev: a54abcd6a50518476ee75b329e245c3341d02341
rev: f987ef1c13e75e6ed60e8e85c8afecb3f485e224
hooks:
- id: ormolu
- id: hlint