fix: dockerfile path #18
This file contains hidden or 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
| name: CI | |
| on: | |
| pull_request: | |
| branches: [ master, main ] | |
| push: | |
| branches: [ master, main ] | |
| jobs: | |
| set-version: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: mcr.microsoft.com/dotnet/sdk:6.0 | |
| outputs: | |
| semVer: ${{ steps.gitversion.outputs.semVer }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: set global dir | |
| run: git config --system --add safe.directory "$GITHUB_WORKSPACE" | |
| - name: Install GitVersion | |
| uses: gittools/actions/gitversion/setup@v1 | |
| with: | |
| versionSpec: '5.x' | |
| - name: Set SemVer Version | |
| uses: gittools/actions/gitversion/execute@v1 | |
| id: gitversion | |
| pr: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: golang:1.24-bookworm | |
| needs: set-version | |
| env: | |
| REVISION: $GITHUB_SHA | |
| SEMVER: ${{ needs.set-version.outputs.semVer }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install deps | |
| run: | | |
| # Chromium dependencies | |
| apt-get update && apt-get install -y jq git \ | |
| zip unzip \ | |
| libnss3 \ | |
| libxss1 \ | |
| libasound2 \ | |
| libxtst6 \ | |
| libgtk-3-0 \ | |
| libgbm1 \ | |
| ca-certificates | |
| git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| git config user.email ${{ github.actor }}[email protected] | |
| git config user.name ${{ github.actor }} | |
| - name: make test | |
| run: | | |
| make REVISION=$GITHUB_SHA test | |
| - name: Publish Junit style Test Report | |
| uses: mikepenz/action-junit-report@v3 | |
| if: always() # always run even if the previous step fails | |
| with: | |
| report_paths: '**/report-junit.xml' | |
| - name: Analyze with SonarCloud | |
| # You can pin the exact commit or the version. | |
| uses: SonarSource/sonarcloud-github-action@master | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} # Generate a token on Sonarcloud.io, add it to the secrets of this repo with the name SONAR_TOKEN (Settings > Secrets > Actions > add new repository secret) | |
| with: | |
| args: | |
| -Dsonar.projectVersion=${{ needs.set-version.outputs.semVer }} | |
| -Dsonar.go.coverage.reportPaths=/github/workspace/.coverage/out | |
| -Dsonar.go.tests.reportPaths=/github/workspace/.coverage/report-junit.xml |