Add string regexes. #597
Workflow file for this run
This file contains 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: | |
push: | |
branches: | |
- mainstream | |
pull_request: | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
permissions: read-all | |
jobs: | |
test: | |
name: Test | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of SonarCloud analysis | |
- name: Set up JDK 17 # Needed for sonarscanner | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'microsoft' | |
java-version: '17' | |
- name: Set up .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore .NET local tools | |
run: dotnet tool restore | |
- name: Enable SonarCloud scanning | |
env: | |
# We can't use secrets in if conditions so we first put it in an environment variable. | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
if: vars.SONAR_PROJECT_KEY != null && env.SONAR_TOKEN != null && runner.os == 'Linux' | |
run: | | |
dotnet sonarscanner begin /k:"${{ vars.SONAR_PROJECT_KEY }}" /o:"${{ vars.SONAR_PROJECT_ORGANIZATION }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="./**/*.opencover.xml" | |
- name: Run tests | |
run: | | |
dotnet run --project eng/Farkle.Build.fsproj -- -t Test | |
- name: End SonarCloud scanning | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
if: vars.SONAR_PROJECT_KEY != null && env.SONAR_TOKEN != null && runner.os == 'Linux' | |
run: | | |
dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" | |
full_ci_passed: | |
needs: [test] | |
runs-on: ubuntu-latest | |
steps: | |
- run: exit 0 |