Skip to content

Bump minimum Go version to 1.22 #1534

Bump minimum Go version to 1.22

Bump minimum Go version to 1.22 #1534

Workflow file for this run

name: Tests
on:
push:
branches:
- "**"
tags-ignore:
- "v*"
pull_request:
branches:
- main
permissions:
contents: read
jobs:
go-test:
name: Go Unit Tests
permissions:
id-token: write
contents: read
uses: harryzcy/github-actions/.github/workflows/go.yml@main
integration-test:
name: Integration Tests
needs: go-test
strategy:
matrix:
go-version: ["1.22", "1.23"]
runs-on: ubuntu-24.04
permissions:
id-token: write
services:
dynamodb:
image: amazon/dynamodb-local@sha256:d7ebddeb60fa418bcda218a6c6a402a58441b2a20d54c9cb1d85fd5194341753 # v2.2.0
ports:
- 8000:8000
steps:
- uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Run integration tests
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./integration/...
env:
DYNAMODB_TABLE: test
DYNAMODB_ORIGINAL_INDEX: OriginalMessageIDIndex
- name: Upload coverage to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
file: ./coverage.txt
use_oidc: true
scripts:
name: Script Tests
strategy:
matrix:
os: [ubuntu-24.04, macos-14]
node-version: [18.x, 20.x]
runs-on: ${{ matrix.os }}
steps:
- uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Setup Node
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
with:
node-version: ${{ matrix.node-version }}
check-latest: true
- name: Install serverless
run: npm install serverless@v3
- name: Copy over config
run: cp serverless.yml.example serverless.yml
- name: Test
run: npx serverless print