1
0
Fork 0
mirror of https://github.com/prometheus-operator/prometheus-operator.git synced 2025-04-16 01:06:27 +00:00
prometheus-operator/.github/workflows/unit.yaml
Dhruv 26e72997e8
Feat: Implemented Github Action linter (#7123)
* ci: add actionlint workflow for GitHub Actions

This workflow integrates actionlint into the CI pipeline to lint and
validate GitHub Actions workflows.

Fixes #7094 

Signed-off-by: slashexx dhruvpuri.35@gmail.com
Co-authored-by: Simon Pasquier <spasquie@redhat.com>
2024-11-22 10:35:54 +05:30

45 lines
1.2 KiB
YAML

name: unit
on:
pull_request:
push:
branches:
- 'release-*'
- 'master'
- 'main'
tags:
- 'v*'
# To cancel running workflow when new commits pushed in a pull request
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
changed-files:
uses: ./.github/workflows/changed-files.yaml
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
needs: changed-files
if: ${{ needs.changed-files.outputs.non-markdown-files }}
steps:
- uses: actions/checkout@v4
- name: Import environment variables from file
run: cat ".github/env" >> "$GITHUB_ENV"
- uses: actions/setup-go@v5
with:
go-version: '${{ env.golang-version }}'
check-latest: true
- run: make test-unit
extended-tests:
runs-on: ubuntu-latest
name: Extended tests
needs: changed-files
if: ${{ needs.changed-files.outputs.non-markdown-files }}
steps:
- uses: actions/checkout@v4
- name: Import environment variables from file
run: cat ".github/env" >> "$GITHUB_ENV"
- uses: actions/setup-go@v5
with:
go-version: ${{ env.golang-version }}
check-latest: true
- run: make test-long