Skip to content

Build and test

Build and test #166

Workflow file for this run

---
name: Build and test
on:
push:
branches:
- main
- master
tags:
- '**'
pull_request:
branches:
- main
- master
schedule:
- cron: '0 1 * * *'
concurrency:
group: ${{ github.workflow }}@${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
PACK_DIR: /root/.pack
jobs:
build-and-test:
name: Build and test `${{ github.repository }}`
runs-on: ubuntu-latest
container: ghcr.io/stefan-hoeck/idris2-pack:latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Switch to the latest collection
run: pack switch latest
- name: Compute the package name
run: echo "package_name=$(sed -e 's|.*/||' -e 's/idris2\?-//' <<< ${{ github.repository }})" >> "$GITHUB_ENV"
- name: Build `${{ env.package_name }}`
run: pack build ${{ env.package_name }}
- name: Test `${{ env.package_name }}`
run: pack test ${{ env.package_name }}