-
Notifications
You must be signed in to change notification settings - Fork 11
40 lines (40 loc) · 1.2 KB
/
main.yml
File metadata and controls
40 lines (40 loc) · 1.2 KB
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
on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.22.x, 1.x]
os: [ubuntu-latest]
arch: ["", "386"]
fail-fast: false
runs-on: ${{ matrix.os }}
permissions:
contents: read
steps:
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Check formatting
run: diff -u <(echo -n) <(gofmt -d .)
if: ${{ matrix.go-version == '1.x' }}
- name: Run go vet
run: go vet ./...
- name: Run staticcheck
uses: dominikh/staticcheck-action@9716614d4101e79b4340dd97b10e54d68234e431 # v1.4.1
with:
version: "2025.1"
install-go: false
cache-key: ${{ matrix.go-version }}
if: ${{ matrix.go-version == '1.x' }}
- name: Checkout tc39 tests
run: ./.tc39_test262_checkout.sh
- name: Run tests
env:
GOARCH: ${{ matrix.arch }}
run: go test -vet=off ./...