Skip to content

Commit

Permalink
CI improvements (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
sestrella authored Nov 30, 2023
1 parent fef2738 commit e603d88
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 55 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: build

on: push

concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
fail-fast: true
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Remove GHCup
run: ghcup nuke
- name: Check GHCup is not present
run: "! command -v ghcup"
shell: bash
- name: Run unit tests
run: ./test/bats/bin/bats -T test
- name: Run integration tests
uses: asdf-vm/actions/plugin-test@v3
with:
plugin: ghc
command: ghc --version
54 changes: 0 additions & 54 deletions .github/workflows/ci.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: release

on:
workflow_run:
workflows: [build]
types: [completed]
branches: [main]

jobs:
release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: npm
- run: npm ci
- run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# asdf-ghcup

[![CI](https://github.com/sestrella/asdf-ghcup/actions/workflows/ci.yml/badge.svg)](https://github.com/sestrella/asdf-ghcup/actions/workflows/ci.yml)
[![build](https://github.com/sestrella/asdf-ghcup/actions/workflows/build.yml/badge.svg)](https://github.com/sestrella/asdf-ghcup/actions/workflows/build.yml)
[![release](https://github.com/sestrella/asdf-ghcup/actions/workflows/release.yml/badge.svg)](https://github.com/sestrella/asdf-ghcup/actions/workflows/release.yml)

An asdf plugin wrapping [GHCup](https://www.haskell.org/ghcup).

Expand Down

0 comments on commit e603d88

Please sign in to comment.