chore(deps): bump github.com/prometheus/client_golang from 1.16.0 to 1.17.0 #274
Workflow file for this run
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
# Run integration tests. | |
# Start when pull request is labeled with 'run/tests' label. | |
name: Tests | |
on: | |
pull_request: | |
types: [labeled] | |
jobs: | |
check: | |
name: Check and remove label | |
runs-on: ubuntu-latest | |
outputs: | |
run_tests: ${{ steps.check.outputs.run_tests }} | |
build_multi_arch: ${{ steps.check.outputs.build_multi_arch }} | |
steps: | |
- uses: actions/github-script@v6 | |
id: check | |
with: | |
script: | | |
const RUN_TESTS_LABEL = 'run/tests'; | |
const labelName = context.payload.label.name; | |
if (labelName !== RUN_TESTS_LABEL) { | |
return console.log(`Not a 'run tests' label: '${labelName}'. Skip tests.`); | |
} | |
console.log(`Detect 'run tests' label '${labelName}'. Remove label and run tests.`); | |
core.setOutput('run_tests', 'true'); | |
try { | |
await github.rest.issues.removeLabel({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
name: labelName, | |
}); | |
} catch (e) { | |
console.log(`Error occurred while remove label. Possibly label is already removed. Ignore '${typeof e}' error.`); | |
} | |
integration_tests: | |
name: Integration tests | |
needs: | |
- check | |
if: needs.check.outputs.run_tests == 'true' | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- k8s_version: "1.19" | |
kind_node_image: "kindest/node:v1.19.16" | |
cluster_name: "kube-1-19" | |
- k8s_version: "1.20" | |
kind_node_image: "kindest/node:v1.20.15" | |
cluster_name: "kube-1-20" | |
- k8s_version: "1.23" | |
kind_node_image: "kindest/node:v1.23.13" | |
cluster_name: "kube-1-23" | |
- k8s_version: "1.24" | |
kind_node_image: "kindest/node:v1.24.7" | |
cluster_name: "kube-1-24" | |
- k8s_version: "1.25" | |
kind_node_image: "kindest/node:v1.25.2" | |
cluster_name: "kube-1-25" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go 1.20 | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" | |
- name: Check out shell-operator code | |
uses: actions/checkout@v4 | |
- name: Restore Go modules | |
id: go-modules-cache | |
uses: actions/[email protected] | |
with: | |
path: | | |
~/go/pkg/mod | |
key: ${{ runner.os }}-gomod-${{ hashFiles('go.mod', 'go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-gomod- | |
- name: Download Go modules | |
if: steps.go-modules-cache.outputs.cache-hit != 'true' | |
run: | | |
go mod download | |
echo -n "Go modules unpacked size is: " && du -sh $HOME/go/pkg/mod | |
- name: Download prebuilt libjq static libraries | |
run: | | |
curl -sSfL https://github.com/flant/libjq-go/releases/download/jq-b6be13d5-0/libjq-glibc-amd64.tgz | tar zxf - | |
- name: Install ginkgo | |
run: | | |
go install github.com/onsi/ginkgo/ginkgo | |
echo $PATH | |
ls -la $GOPATH/bin | |
ginkgo version | |
- name: Start kind cluster | |
uses: engineerd/[email protected] | |
with: | |
version: "v0.17.0" | |
image: ${{ matrix.kind_node_image }} | |
name: ${{ matrix.cluster_name }} | |
- name: Run integration tests | |
env: | |
CLUSTER_NAME: ${{ matrix.cluster_name }} | |
run: | | |
export CGO_ENABLED=1 | |
export CGO_CFLAGS="-I$GITHUB_WORKSPACE/libjq/include" | |
export CGO_LDFLAGS="-L$GITHUB_WORKSPACE/libjq/lib" | |
export GOOS=linux | |
ginkgo \ | |
--tags 'integration test' \ | |
--vet off \ | |
--race \ | |
-p \ | |
-r test/integration |