mirror of https://github.com/shirou/gopsutil
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.0 KiB
YAML
43 lines
1.0 KiB
YAML
name: Build Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
go-versions:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
versions: ${{ steps.versions.outputs.value }}
|
|
steps:
|
|
- id: versions
|
|
run: |
|
|
versions=$(curl -s 'https://go.dev/dl/?mode=json' | jq -c 'map(.version[2:])')
|
|
echo "value=${versions}" >> $GITHUB_OUTPUT
|
|
build_test:
|
|
needs: go-versions
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go-version: ${{fromJson(needs.go-versions.outputs.versions)}}
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
- name: Install Go
|
|
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Build Test v3
|
|
run: |
|
|
make build_test
|