Skip to content

Commit 43c51b5

Browse files
committed
ci: add build and lint workflows
1 parent ebd92c0 commit 43c51b5

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/push-pr.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Push/PR
2+
3+
on:
4+
pull_request: {}
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
test:
11+
name: Build
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Extract k6 version from go.mod
16+
id: version
17+
run: |-
18+
k6version=$(grep -e go.k6.io go.mod | cut -d' ' -f 2)
19+
echo "Detected k6 version: ${k6version}"
20+
echo "k6=${k6version}" >> $GITHUB_OUTPUT
21+
- name: Build with xk6
22+
run: |-
23+
docker run --rm -i -u "$(id -u):$(id -g)" -v "${PWD}:/xk6" \
24+
grafana/xk6 build ${{ steps.version.outputs.k6 }} \
25+
--with sm=.
26+
27+
golangci:
28+
name: Lint
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: golangci-lint
33+
uses: golangci/golangci-lint-action@v6
34+
with:
35+
only-new-issues: true
36+
args: --timeout=5m # 1m is not enough, experimentally.

0 commit comments

Comments
 (0)