Skip to content

Merge pull request #68 from ridhoq/dot-slash-valid-subpath-prefix #81

Merge pull request #68 from ridhoq/dot-slash-valid-subpath-prefix

Merge pull request #68 from ridhoq/dot-slash-valid-subpath-prefix #81

Workflow file for this run

name: test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
go-version: [1.21.x, 1.22.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Download test data
run: curl -L https://raw.githubusercontent.com/package-url/purl-spec/master/test-suite-data.json -o testdata/test-suite-data.json
- name: Test go fmt
run: test -z $(go fmt ./...)
- name: Golangci-lint
uses: golangci/golangci-lint-action@v2
with:
only-new-issues: true
- name: Test coverage
run: go test -covermode atomic -coverprofile='profile.cov' ./...
- name: Send coverage
if: runner.os == 'Linux'
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
go install github.com/mattn/goveralls@latest
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github
- name: Fuzz tests
run: make fuzz