Skip to content

Add nixfmt tool, format #29

Add nixfmt tool, format

Add nixfmt tool, format #29

Workflow file for this run

name: ci
on:
push:
branches:
- main
- nixfmt
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- "macos-latest"
- "ubuntu-latest"
app:
- name: "cabal-fmt"
cmd: "nix run .#cabal-fmt -- --help"
- name: "fourmolu"
cmd: "nix run .#fourmolu -- --help"
- name: "hlint"
cmd: "nix run .#hlint -- --help"
- name: "nixfmt"
cmd: "nix run .#nixfmt -- --help"
- name: "nixpkgs-fmt"
cmd: "nix run .#nixpkgs-fmt"
- name: "ormolu"
cmd: "nix run .#ormolu -- --help"
- name: "stylish"
cmd: "nix run .#stylish -- --help"
- name: "help"
cmd: "nix run .#help"
- name: "version"
cmd: "nix run .#version"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/b39924fc7764c08ae3b51beef9a3518c414cdb7d.tar.gz
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: Check
run: nix flake check
- name: Test ${{ matrix.app.name }}
run: ${{ matrix.app.cmd }}
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup nix
uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/b39924fc7764c08ae3b51beef9a3518c414cdb7d.tar.gz
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- name: nixpkgs-fmt
run: nix run .#nixfmt -- --check