Skip to content

Commit

Permalink
ci: run osv-linter tests (#297)
Browse files Browse the repository at this point in the history
This setups up a workflow for running the `osv-linter` tests for pull
requests - it looks like there are also tests for the Python-based
tools, which I'll look into as a follow up.

This'll make it easier to later add CI for #292

Signed-off-by: Gareth Jones <jones258@gmail.com>
  • Loading branch information
G-Rath authored Oct 21, 2024
1 parent fec8d2c commit 474e70e
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Checks

on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]

concurrency:
# Pushing new changes to a branch will cancel any in-progress CI runs
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Restrict jobs in this workflow to have no permissions by default; permissions
# should be granted per job as needed using a dedicated `permissions` block
permissions: {}

jobs:
tests_osv-linter:
permissions:
contents: read # to fetch code (actions/checkout)
name: Run unit tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tools/osv-linter
steps:
- name: Check out code
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: stable
check-latest: true

- run: go test ./...

0 comments on commit 474e70e

Please sign in to comment.