forked from stefnedelchevbrady/xk6-sql-with-oracle
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: CI
on:
# Enable manually triggering this workflow via the API or web UI
workflow_dispatch:
push:
branches:
- main
- master
tags:
- v*
pull_request:
jobs:
build-with-xk6:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
- name: Retrieve get module name
run: |
echo "::set-output name=Module::$(go list -m)"
id: module-name
- name: Verify builds with xk6
run: |
go install go.k6.io/xk6/cmd/xk6@latest
CGO_ENABLED=1 xk6 build --with ${{ steps.module-name.outputs.Module }}=.
run-unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: 1.19.x
- name: Run unit tests
run: go test -v -cover -race ./...