mirror of
https://github.com/shirou/gopsutil.git
synced 2025-05-12 19:29:30 +08:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](c85c95e3d7...f43a0e5ff2
)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
46 lines
1.5 KiB
YAML
46 lines
1.5 KiB
YAML
on: [push, pull_request]
|
|
name: Test
|
|
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 "::set-output name=value::${versions}"
|
|
test_v3_module:
|
|
needs: go-versions
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
go-version: ${{fromJson(needs.go-versions.outputs.versions)}}
|
|
os: [ubuntu-22.04, ubuntu-20.04, windows-2022, windows-2019, macos-11, macos-12]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
- name: Checkout code
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
|
- id: go-env
|
|
run: |
|
|
echo "::set-output name=cache::$(go env GOCACHE)"
|
|
echo "::set-output name=mod-cache::$(go env GOMODCACHE)"
|
|
- name: Cache go modules
|
|
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
|
|
with:
|
|
path: |
|
|
${{ steps.go-env.outputs.cache }}
|
|
${{ steps.go-env.outputs.mod-cache }}
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: ${{ runner.os }}-go-
|
|
- name: Test
|
|
run: |
|
|
go test -coverprofile='coverage.out' -covermode=atomic ./...
|