-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (44 loc) · 1.44 KB
/
haskell-nightly.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Haskell CI
on:
schedule:
- cron: '0 3 * * *' # daily at 3 am
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check for new commits today
id: new-commits
uses: adriangl/check-new-commits-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
seconds: 86400 # One day in seconds
branch: ${{ github.event.repository.default_branch }}
- uses: actions/checkout@v3
if: ${{ steps.new-commits.outputs.has-new-commits == 'true' }}
- name: Cache Stack
if: ${{ steps.new-commits.outputs.has-new-commits == 'true' }}
id: cache-stack-unix
uses: actions/cache@v3
with:
path: ~/.stack
key: ubuntu-latest-stack-home-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
- name: Setup stack
if: ${{ steps.new-commits.outputs.has-new-commits == 'true' }}
uses: haskell/actions/setup@v2
with:
enable-stack: true
stack-no-global: true
- name: Install dependencies
if: ${{ steps.new-commits.outputs.has-new-commits == 'true' }}
run: |
set -ex
stack --no-terminal --install-ghc test --bench --only-dependencies
set +ex
- name: Build
if: ${{ steps.new-commits.outputs.has-new-commits == 'true' }}
run: |
set -ex
stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
set +ex