Skip to content

Commit

Permalink
ci(github): add GitHub validation workflow
Browse files Browse the repository at this point in the history
Add a GitHub validation workflow that runs tests across supported Go
versions on every push to `main` branch as well as on every push to an
open PR.
  • Loading branch information
arikkfir committed May 3, 2024
1 parent 5edfa0b commit 4e9a9cf
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 10 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Validation

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:

build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version: [ '1.21', '1.22' ]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}

- name: Download dependencies
run: go mod download -x

- name: Test
run: go test -v ./...
9 changes: 3 additions & 6 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
This library has been tested on Go version 1.22 only. It should work on versions though, but this has not been tested.

| Version | Supported |
| ------- | ------------------ |
|---------|--------------------|
| 1.22 | :white_check_mark: |
| 1.21 | Probably |
| 1.20 | Probably |
| 1.19 | Probably |
| 1.18 | Probably |
| < 1.18 | :x: |
| 1.21 | :white_check_mark: |
| < 1.21 | :x: |

## Reporting a Vulnerability

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/arikkfir/justest

go 1.18
go 1.21

require (
github.com/alecthomas/chroma/v2 v2.13.0
Expand Down
3 changes: 0 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
github.com/alecthomas/assert/v2 v2.6.0 h1:o3WJwILtexrEUk3cUVal3oiQY2tfgr/FHWiz/v2n4FU=
github.com/alecthomas/assert/v2 v2.6.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/chroma/v2 v2.13.0 h1:VP72+99Fb2zEcYM0MeaWJmV+xQvz5v5cxRHd+ooU1lI=
github.com/alecthomas/chroma/v2 v2.13.0/go.mod h1:BUGjjsD+ndS6eX37YgTchSEG+Jg9Jv1GiZs9sqPqztk=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=

0 comments on commit 4e9a9cf

Please sign in to comment.