Skip to content

use go 1.22 and update actions #22

use go 1.22 and update actions

use go 1.22 and update actions #22

Workflow file for this run

name: Build
on:
# Enable manually triggering this workflow via the API or web UI
workflow_dispatch:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
jobs:
build-with-xk6:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
check-latest: true
- name: Get module name
run: |
echo "Module=$(go list -m)" >> $GITHUB_OUTPUT
id: module-name
- name: Verify builds with xk6
run: |
go install go.k6.io/xk6/cmd/xk6@latest
xk6 build --with ${{ steps.module-name.outputs.Module }}=.
run-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.x
check-latest: true
- name: Run unit tests
run: go test -v -cover -race ./...