Skip to content

chore: update workflows #2930

chore: update workflows

chore: update workflows #2930

Workflow file for this run

name: "build-and-test"
on: # rebuild any PRs and main branch changes
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v5
with:
node-version: 24.x
- uses: actions/checkout@v5
- run: |
npm install
npm run all
# Fail the build if there is dirty change
- run: git diff --exit-code
test: # make sure the action works on a clean machine without building
needs: [ build ]
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-22.04-arm
- macos-latest
- windows-latest
version:
- ""
- "latest"
- "v2.5"
- "v2.5.0"
runs-on: ${{ matrix.os }}
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 24.x
- uses: actions/setup-go@v6
with:
go-version: oldstable
- uses: ./
with:
version: ${{ matrix.version }}
args: --timeout=5m --issues-exit-code=0 ./sample/...
only-new-issues: true
test-go-install: # make sure the action works on a clean machine without building (go-install mode)
needs: [ build ]
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-22.04-arm
- macos-latest
- windows-latest
version:
- ""
- "latest"
- "v2.5.0"
- "655e8ede5178280b2a640e185bc4a343aed0f54e"
runs-on: ${{ matrix.os }}
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 24.x
- uses: actions/setup-go@v6
with:
go-version: oldstable
- uses: ./
with:
version: ${{ matrix.version }}
args: --timeout=5m --issues-exit-code=0 ./sample/...
only-new-issues: true
install-mode: goinstall
test-go-mod:
needs: [ build ]
strategy:
matrix:
os:
- ubuntu-latest
- ubuntu-22.04-arm
- macos-latest
- windows-latest
wd:
- sample-go-mod
- sample-go-tool
runs-on: ${{ matrix.os }}
permissions:
contents: read
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 24.x
- uses: actions/setup-go@v6
with:
go-version: oldstable
- uses: ./
with:
working-directory: ${{ matrix.wd }}
args: --timeout=5m --issues-exit-code=0 ./...