2022-11-02 05:08:49 +01:00
|
|
|
name: Vulnerability Check
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, macos-latest, windows-latest]
|
2023-07-12 05:01:40 +02:00
|
|
|
go: ['1.19.11', '1.20.6']
|
2022-11-02 05:08:49 +01:00
|
|
|
name: Vulnerability Check with Go ${{ matrix.go }} on ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
env:
|
|
|
|
DISPLAY: ':99.0'
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
steps:
|
|
|
|
- name: Git
|
|
|
|
run: |
|
|
|
|
# See actions/checkout#135
|
|
|
|
git config --global core.autocrlf false
|
|
|
|
git config --global core.eol lf
|
|
|
|
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Go
|
|
|
|
uses: actions/setup-go@v3
|
|
|
|
with:
|
|
|
|
go-version: ${{ matrix.go }}
|
|
|
|
cache: true
|
|
|
|
|
2022-11-02 05:50:51 +01:00
|
|
|
- name: Install govulncheck
|
|
|
|
run: |
|
|
|
|
go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
|
|
|
2022-11-02 05:08:49 +01:00
|
|
|
- name: Install dependencies
|
2022-11-12 07:46:42 +01:00
|
|
|
if: runner.os == 'Linux'
|
2022-11-02 05:08:49 +01:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install libasound2-dev libgl1-mesa-dev libxcursor-dev libxi-dev libxinerama-dev libxrandr-dev libxxf86vm-dev
|
|
|
|
|
|
|
|
- name: govulncheck
|
|
|
|
run: |
|
2022-11-03 12:24:09 +01:00
|
|
|
govulncheck ./...
|
|
|
|
env GOOS=js GOARCH=wasm govulncheck ./...
|