added formatting CI task
This commit is contained in:
parent
6b90cb038b
commit
2255feb1ea
3 changed files with 38 additions and 13 deletions
5
.github/format.sh
vendored
Normal file
5
.github/format.sh
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/refs/tags/21.05.tar.gz \
|
||||||
|
-p haskellPackages.fourmolu \
|
||||||
|
--run 'make format_check'
|
||||||
33
.github/workflows/integrate.yaml
vendored
Normal file
33
.github/workflows/integrate.yaml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- "**.hs"
|
||||||
|
- "**.nix"
|
||||||
|
- "flake.lock"
|
||||||
|
- "agora.cabal"
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "**.hs"
|
||||||
|
- "**.nix"
|
||||||
|
- "flake.lock"
|
||||||
|
- "agora.cabal"
|
||||||
|
jobs:
|
||||||
|
check-formatting:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- uses: actions/cache@v2.1.4
|
||||||
|
name: Cache Stack
|
||||||
|
with:
|
||||||
|
path: ~/.stack
|
||||||
|
key: ${{ runner.os }}-stack-formatting
|
||||||
|
restore-keys: ${{ runner.os }}-stack-
|
||||||
|
|
||||||
|
- run: stack install fourmolu
|
||||||
|
name: Setup
|
||||||
|
|
||||||
|
- run: ./.github/format.sh
|
||||||
|
name: "Run fourmolu"
|
||||||
13
.github/workflows/learn-github-actions.yml
vendored
13
.github/workflows/learn-github-actions.yml
vendored
|
|
@ -1,13 +0,0 @@
|
||||||
name: learn-github-actions
|
|
||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
check-bats-version:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: '14'
|
|
||||||
- run: npm install -g bats
|
|
||||||
- run: bats -v
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue