diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 22e6d670..26c94dd3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -81,14 +81,20 @@ jobs: strategy: fail-fast: false matrix: - os: - - ubuntu-latest - - macos-latest - - windows-latest - runs-on: ${{ matrix.os }} + env: + - os: ubuntu-latest + node: 20 + - os: macos-latest + node: 20 + - os: windows-latest + node: 20.12.1 # Pinned, because of https://github.com/approvals/Approvals.NodeJS/issues/176 + runs-on: ${{ matrix.env.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.env.node }} + cache: npm - run: npm ci - run: npx barnard59 run test/e2e/definitions/file-loader.ttl - run: npx barnard59 run test/e2e/definitions/foreach/with-handler.ttl @@ -103,25 +109,31 @@ jobs: strategy: fail-fast: false matrix: - os: - - ubuntu-latest - - macos-latest - - windows-latest - runs-on: ${{ matrix.os }} + env: + - os: ubuntu-latest + node: 20 + - os: macos-latest + node: 20 + - os: windows-latest + node: 20.12.1 # Pinned, because of https://github.com/approvals/Approvals.NodeJS/issues/176 + runs-on: ${{ matrix.env.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.env.node }} + cache: npm - run: npm ci - name: pack all run: npm pack -ws - run: npm install -g barnard59-*.tgz - if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' + if: matrix.env.os == 'ubuntu-latest' || matrix.env.os == 'macos-latest' - run: cmd /c npm install -g (Get-ChildItem -Filter barnard59-*.tgz).FullName - if: matrix.os == 'windows-latest' + if: matrix.env.os == 'windows-latest' - run: which barnard59 - run: barnard59 --help - run: barnard59 shacl validate --shapes test/support/pipeline-shapes.ttl < test/e2e/definitions/file-loader.ttl - if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' + if: matrix.env.os == 'ubuntu-latest' || matrix.os == 'macos-latest' - run: barnard59 shacl validate --shapes test/support/pipeline-shapes.ttl < test/e2e/definitions/file-loader.ttl - if: matrix.os == 'windows-latest' + if: matrix.env.os == 'windows-latest' shell: cmd