Skip to content

Commit

Permalink
Streamline CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tbidne committed Sep 16, 2023
1 parent 0803401 commit 7bb0672
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 86 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: ci

on:
push:
branches:
- main

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: "haddock coverage"
cmd: "nix run .#haddock-cov -- --nh-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 .#nixpkgs-fmt -- --check
56 changes: 0 additions & 56 deletions .github/workflows/nix.yaml

This file was deleted.

28 changes: 0 additions & 28 deletions .github/workflows/style.yaml

This file was deleted.

3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

[![GitHub release (latest SemVer)](https://img.shields.io/github/v/tag/tbidne/nix-hs-tools?include_prereleases&sort=semver)](https://github.com/tbidne/nix-hs-tools/releases/)
![haskell](https://img.shields.io/static/v1?label=&message=9.4&logo=haskell&logoColor=655889&labelColor=2f353e&color=655889)
[![nix](http://img.shields.io/github/actions/workflow/status/tbidne/nix-hs-tools/nix.yaml?branch=main&label=nix&logo=nixos&logoColor=85c5e7&labelColor=2f353c)](https://github.com/tbidne/nix-hs-tools/actions/workflows/nix.yaml)
[![style](http://img.shields.io/github/actions/workflow/status/tbidne/nix-hs-tools/style.yaml?branch=main&label=style&logoColor=white&labelColor=2f353c)](https://github.com/tbidne/nix-hs-tools/actions/workflows/style.yaml)
[![ci](http://img.shields.io/github/actions/workflow/status/tbidne/nix-hs-tools/ci.yaml?branch=main&logoColor=85c5e7&labelColor=2f353c)](https://github.com/tbidne/nix-hs-tools/actions/workflows/ci.yaml)
[![MIT](https://img.shields.io/github/license/tbidne/nix-hs-tools?color=blue)](https://opensource.org/licenses/MIT)

### Haskell development tools by Nix
Expand Down

0 comments on commit 7bb0672

Please sign in to comment.