Skip to content

Commit

Permalink
Run all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Jul 29, 2021
1 parent c558aa1 commit 5d5a0f1
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 2 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/haskell.yml
@@ -1,6 +1,17 @@
name: Haskell CI

on: [push]
on:
push:
workflow_dispatch:
inputs:
reason:
description: 'Reason'
required: false
default: manual
tests:
description: 'Tests'
required: false
default: some

jobs:
build:
Expand Down Expand Up @@ -89,7 +100,14 @@ jobs:
run: retry 2 cabal update

- name: Configure build
run: cp .github/workflows/cabal.project.local.$RUNNER_OS cabal.project.local
run: |
if [ "${{github.event.inputs.tests}}" == "all" ]; then
echo "Reconfigure cabal projects to run tests for all dependencies"
cat cabal.project | sed 's|tests: False|tests: True|g' > cabal.project.new
mv cabal.project.new cabal.project
fi
cp .github/workflows/cabal.project.local.$RUNNER_OS cabal.project.local
- name: Record dependencies
run: |
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/nightly-trigger.yml
@@ -0,0 +1,23 @@
name: Nightly trigger

on:
workflow_dispatch:
schedule:
- cron: '* 0 * * *'

jobs:
build:
runs-on: ubuntu-latest

defaults:
run:
shell: bash

steps:

- name: Invoke workflow
uses: benc-uk/workflow-dispatch@v1
with:
workflow: Haskell CI
token: ${{ secrets.MACHINE_TOKEN }}
inputs: '{ "reason": "nightly", "tests": "all" }'

0 comments on commit 5d5a0f1

Please sign in to comment.