Skip to content

Maintenance/version bump helpers #2673

Maintenance/version bump helpers

Maintenance/version bump helpers #2673

Workflow file for this run

name: Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # for SonarQube
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: go.mod
- name: Install ShellSpec
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: shellspec/shellspec
ref: 90e48c950239f3b8a9fdfa3e869592872c77b981 # v0.28.1
path: .shellspec
- name: Add ShellSpec to PATH
run: echo "${{ github.workspace }}/.shellspec" >> "$GITHUB_PATH"
- name: Install kcov
run: sudo apt-get update && sudo apt-get install -y kcov
- run: make verify
- run: make test
- run: make test-sh
- name: SonarQube for PR ${{ github.event.pull_request.number }}
if: github.event_name == 'pull_request'
uses: SonarSource/sonarqube-scan-action@299e4b793aaa83bf2aba7c9c14bedbb485688ec4 # v7.1.0
with:
args: >
-Dsonar.pullrequest.key=${{ github.event.pull_request.number }}
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: SonarQube
if: github.event_name == 'push'
uses: SonarSource/sonarqube-scan-action@299e4b793aaa83bf2aba7c9c14bedbb485688ec4 # v7.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}