-
Notifications
You must be signed in to change notification settings - Fork 51
80 lines (75 loc) · 1.98 KB
/
ci.yml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: hakatime
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-dashboard:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 18.x
- name: Get npm cache directory
id: npm-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
- name: Cache Node.js modules
uses: actions/cache@v2
id: npm-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('dashboard/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Build
run: |
cd dashboard
yarn install
yarn run ci
build-server:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
with:
ghc-version: '9.2.7'
cabal-version: '3.10.1.0'
- uses: haskell/actions/hlint-setup@v2
with:
version: '3.5'
- name: Freeze Cabal plan
run: cabal freeze
- name: Cache Cabal build artifacts
uses: actions/cache@v2
with:
path: |
${{ steps.setup-haskell-build-env.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-cabal
- name: Build
run: cabal build
- uses: haskell/actions/hlint-run@v2
with:
path: src/
fail-on: warning
build-docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Docker build
uses: docker/build-push-action@v3
with:
file: ./Dockerfile
push: false
context: ./