From 1aa0aa2bb1f2a8ea7d148d81d8f1a277439a383c Mon Sep 17 00:00:00 2001 From: Arik Kfir Date: Fri, 3 May 2024 17:15:27 +0300 Subject: [PATCH] ci(github): add GitHub validation workflow 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. --- .github/workflows/validation.yaml | 30 ++++++++++++++++++++++++++++++ SECURITY.md | 9 +++------ go.mod | 2 +- 3 files changed, 34 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/validation.yaml diff --git a/.github/workflows/validation.yaml b/.github/workflows/validation.yaml new file mode 100644 index 0000000..9e07803 --- /dev/null +++ b/.github/workflows/validation.yaml @@ -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 ./... diff --git a/SECURITY.md b/SECURITY.md index c43298d..5ca9628 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -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 diff --git a/go.mod b/go.mod index 9cdd1dc..0392a26 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/arikkfir/justest -go 1.18 +go 1.21 require ( github.com/alecthomas/chroma/v2 v2.13.0