docs: removed download badge #93
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: 1.22.x | |
- name: Check build | |
run: | | |
go version | |
pwd && ls -l | |
go install go.k6.io/xk6/cmd/xk6@latest | |
MODULE_NAME=$(go list -m) | |
xk6 build \ | |
--output ./k6ext \ | |
--with $MODULE_NAME="." | |
./k6ext version | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: [1.22.x, 1.21.x] | |
platform: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Run tests | |
run: | | |
which go | |
go version | |
go test -race -timeout 60s ./... | |
- name: Coverage Test | |
if: ${{ matrix.platform == 'ubuntu-latest' && github.ref_name == 'main' }} | |
run: go test -count 1 -coverprofile=coverage.txt ./... | |
- name: Upload Coverage | |
if: ${{ matrix.platform == 'ubuntu-latest' && github.ref_name == 'main' }} | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
slug: grafana/xk6-sql | |
- name: Generate Go Report Card | |
if: ${{ matrix.platform == 'ubuntu-latest' && github.ref_name == 'main' }} | |
uses: creekorful/[email protected] |