Skip to content

Pin GitHub Actions to full-length commit SHAs #234

Pin GitHub Actions to full-length commit SHAs

Pin GitHub Actions to full-length commit SHAs #234

Workflow file for this run

name: pr-validation
on:
pull_request
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
steps:
- uses: actions/checkout@0717577d45739eb3c851188b29f50ed6c0b2194e # v2.8.0
- uses: actions/setup-dotnet@8e6bd2905eef86446227f003dda1deb3916c4aaf # v2.2.1
with:
global-json-file: global.json
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build dirs.proj
- name: Archive antlr log for troubleshooting
if: ${{ failure() && matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: antlr-log
path: SqlScriptDom/NUL
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
needs: build
steps:
- uses: actions/checkout@0717577d45739eb3c851188b29f50ed6c0b2194e # v2.8.0
- uses: actions/setup-dotnet@8e6bd2905eef86446227f003dda1deb3916c4aaf # v2.2.1
with:
global-json-file: global.json
- name: Disable strong name validation
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
.\disableStrongName.ps1
- name: Run tests Windows
if: matrix.os == 'windows-latest'
run: dotnet test
- name: Run tests Linux
if: matrix.os == 'ubuntu-latest'
run: dotnet test /p:TargetFramework=net8.0