github.com/nuvolaris/goja@v0.0.0-20230825100449-967811910c6d/.github/workflows/main.yml (about)

     1  on: [push, pull_request]
     2  name: Test
     3  jobs:
     4    test:
     5      strategy:
     6        matrix:
     7          go-version: [1.16.x, 1.x]
     8          os: [ubuntu-latest]
     9          arch: ["", "386"]
    10        fail-fast: false
    11      runs-on: ${{ matrix.os }}
    12      steps:
    13        - name: Install Go
    14          uses: actions/setup-go@v3
    15          with:
    16            go-version: ${{ matrix.go-version }}
    17        - name: Checkout code
    18          uses: actions/checkout@v3
    19        - name: Check formatting
    20          run: diff -u <(echo -n) <(gofmt -d .)
    21          if: ${{ matrix.go-version == '1.x' }}
    22        - name: Run go vet
    23          run: go vet ./...
    24        - name: Run staticcheck
    25          uses: dominikh/staticcheck-action@v1.3.0
    26          with:
    27            version: "2023.1.2"
    28            install-go: false
    29            cache-key: ${{ matrix.go-version }}
    30          if: ${{ matrix.go-version == '1.x' }}
    31        - name: Checkout tc39 tests
    32          run: ./.tc39_test262_checkout.sh
    33        - name: Run tests
    34          env:
    35            GOARCH: ${{ matrix.arch }}
    36          run: go test -vet=off ./...