-
-
Notifications
You must be signed in to change notification settings - Fork 15
61 lines (55 loc) · 1.72 KB
/
nodejs.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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
aw-version: [0.12.0b1]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache activitywatch binaries
uses: actions/cache@v2
with:
path: ./activitywatch
key: ${{ runner.os }}-activitywatch-${{ matrix.aw-version }}
- name: Install deps
run: npm ci
- name: Build
run: make build
- name: Download aw-server
run: wget -nc --no-verbose https://github.com/ActivityWatch/activitywatch/releases/download/v${{ matrix.aw-version }}/activitywatch-v${{ matrix.aw-version }}-linux-x86_64.zip
- name: Unzip aw-server
run: unzip -o activitywatch-v${{ matrix.aw-version }}-linux-x86_64.zip
- name: Run tests
run: |
export PATH=./activitywatch/aw-server:$PATH
make test
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install deps
run: npm ci
- name: Build
run: make build
- name: Lint
run: make lint