-
Notifications
You must be signed in to change notification settings - Fork 83
51 lines (50 loc) · 1.4 KB
/
test.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
name: Test
on:
workflow_dispatch:
# Ensure GitHub actions are not run twice for same commits
push:
branches: [master]
tags: ['*']
pull_request:
types: [opened, synchronize, reopened]
jobs:
test-node:
name: Node ${{ matrix.node_version }} on ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node_version: ['*']
runs-on: ${{ matrix.os }}
steps:
- name: Install Node.js ${{ matrix.node_version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
check-latest: true
- name: Git checkout
uses: actions/checkout@v3
- name: Install dependencies
run: npm ci
- name: Tests
run: npm test
test-go:
name: Go ${{ matrix.go_version }} on ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
go_version: [1.19.x, 1.20.x]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go ${{ matrix.go_version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go_version }}
- name: Checkout code
uses: actions/checkout@v3
- name: Install make
run: choco install make
if: ${{ matrix.os == 'windows-latest' }}
- name: Install dependencies
run: make deps
- name: Tests
run: make test