Skip to content

fix(altinn-monitor-test): add read role for grafana (#1045) #111

fix(altinn-monitor-test): add read role for grafana (#1045)

fix(altinn-monitor-test): add read role for grafana (#1045) #111

Workflow file for this run

name: Daisctl PRs
env:
WORKDIR: tools/daisctl
on:
push:
branches:
- "main"
pull_request:
paths:
- "tools/daisctl/**/*.go"
- "tools/daisctl/go.*"
- "tools/daisctl/Makefile"
- "./github/workflows/daisctl-pr.yml"
jobs:
tidy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.WORKDIR }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: '${{ env.WORKDIR }}/go.mod'
cache: true
- name: Check go mod
run: |
go mod tidy
git diff --exit-code go.mod
git diff --exit-code go.sum
lint:
needs: tidy
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ env.WORKDIR }}
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: '${{ env.WORKDIR }}/go.mod'
cache: true
- name: lint
uses: golangci/golangci-lint-action@v6.1.1
with:
version: latest
working-directory: ${{ env.WORKDIR }}
test:
needs: lint
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
shell: bash
test-cmd: make test
- os: macos-latest
shell: bash
test-cmd: make test
- os: windows-latest
shell: powershell
test-cmd: make.exe test
name: Test - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: ${{ env.WORKDIR }}
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: '${{ env.WORKDIR }}/go.mod'
cache: true
- name: Run tests
run: ${{ matrix.test-cmd }}