From 72d9a71ffd7303560a7cd903ddc273284fa6e4d6 Mon Sep 17 00:00:00 2001 From: Dmytro Bondar Date: Mon, 29 Apr 2024 11:15:42 +0200 Subject: [PATCH] Update GitHub workflows - Enable dependabot for github actions - Update actions/checkout to latest version - Use matrix in ci workflow --- .github/dependabot.yaml | 11 ++++ .github/workflows/check-with-upstream.yaml | 2 +- .github/workflows/ci.yaml | 69 ++++++++-------------- 3 files changed, 35 insertions(+), 47 deletions(-) create mode 100644 .github/dependabot.yaml diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 000000000..a6819e3f3 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,11 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly diff --git a/.github/workflows/check-with-upstream.yaml b/.github/workflows/check-with-upstream.yaml index 00fd90fb2..6ded89178 100644 --- a/.github/workflows/check-with-upstream.yaml +++ b/.github/workflows/check-with-upstream.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest name: Check if KSM selectors are present on applicable metrics. steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: persist-credentials: false - run: make --always-make check-selectors-ksm diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bd17701af..837e08829 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,51 +3,28 @@ on: - push - pull_request jobs: - generate: + matrix: runs-on: ubuntu-latest - name: Generate yaml + name: ${{ matrix.name }} + strategy: + fail-fast: false + matrix: + include: + - name: Alerts linter + run: make --always-make alerts-lint + - name: Generate yaml + run: make --always-make generate && git diff --exit-code + - name: Grafana dashboard linter + run: make --always-make dashboards-lint + - name: Jsonnet formatter + run: make --always-make fmt && git diff --exit-code + - name: Jsonnet linter + run: make --always-make jsonnet-lint + - name: Unit tests + run: make --always-make test + steps: - - uses: actions/checkout@v2 - with: - persist-credentials: false - - run: make --always-make generate && git diff --exit-code - jsonnet-lint: - runs-on: ubuntu-latest - name: Jsonnet linter - steps: - - uses: actions/checkout@v2 - with: - persist-credentials: false - - run: make --always-make jsonnet-lint - dashboards-lint: - runs-on: ubuntu-latest - name: Grafana dashboard linter - steps: - - uses: actions/checkout@v2 - with: - persist-credentials: false - - run: make --always-make dashboards-lint - alerts-lint: - runs-on: ubuntu-latest - name: Alerts linter - steps: - - uses: actions/checkout@v2 - with: - persist-credentials: false - - run: make --always-make alerts-lint - fmt: - runs-on: ubuntu-latest - name: Jsonnet formatter - steps: - - uses: actions/checkout@v2 - with: - persist-credentials: false - - run: make --always-make fmt && git diff --exit-code - unit-tests: - runs-on: ubuntu-latest - name: Unit tests - steps: - - uses: actions/checkout@v2 - with: - persist-credentials: false - - run: make --always-make test + - uses: actions/checkout@v4 + with: + persist-credentials: false + - run: ${{ matrix.run }}