feat: update texlive template #230
Workflow file for this run
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: "Test Template & Features" | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| changes: | |
| name: Detect changed features & templates | |
| runs-on: ubuntu-latest | |
| outputs: | |
| templates: ${{ steps.changed_files.outputs.templates }} | |
| features: ${{ steps.changed_files.outputs.features }} | |
| changesToNuke: ${{ steps.changed_files.outputs.changesToNuke }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| name: pull branch | |
| with: | |
| fetch-depth: 0 | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| - name: "Cache: .nuke/temp, ~/.nuget/packages" | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .nuke/temp | |
| ~/.nuget/packages | |
| key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} | |
| - name: find changed templates & features | |
| id: changed_files | |
| run: ./build.sh ListTemplatesAndFeatures -GithubOutput "$GITHUB_OUTPUT" | |
| test-templates: | |
| if: ${{ needs.changes.outputs.templates }} | |
| needs: [changes] | |
| name: Test template ${{ matrix.template }} | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| strategy: | |
| matrix: | |
| template: ${{ fromJSON(needs.changes.outputs.templates) }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: "Cache: .nuke/temp, ~/.nuget/packages" | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .nuke/temp | |
| ~/.nuget/packages | |
| key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} | |
| - name: Install Node | |
| uses: actions/setup-node@v3 | |
| - name: Install dev containers | |
| run: npm install -g @devcontainers/cli | |
| - name: Run test for '${{ matrix.template }}' | |
| id: smoke_test | |
| run: ./build.sh TestTemplate -Template '${{ matrix.template }}' | |
| test-features: | |
| if: ${{ needs.changes.outputs.features }} | |
| needs: [changes] | |
| name: Test feature ${{ matrix.feature }} | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| strategy: | |
| matrix: | |
| feature: ${{ fromJSON(needs.changes.outputs.features) }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: "Cache: .nuke/temp, ~/.nuget/packages" | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .nuke/temp | |
| ~/.nuget/packages | |
| key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} | |
| - name: Install Node | |
| uses: actions/setup-node@v3 | |
| - name: Install dev containers | |
| run: npm install -g @devcontainers/cli | |
| - name: Run test for '${{ matrix.feature }}' | |
| id: smoke_test | |
| run: ./build.sh TestFeature -Feature '${{ matrix.feature }}' | |
| test-nuke: | |
| if: ${{ needs.changes.outputs.changesToNuke == 'true' }} | |
| needs: [changes] | |
| name: Test nuke | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "9.x.x" | |
| - name: "Cache: .nuke/temp, ~/.nuget/packages" | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| .nuke/temp | |
| ~/.nuget/packages | |
| key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} | |
| - run: git switch -c test-branch | |
| - run: | | |
| dotnet nuget add source \ | |
| https://nuget.pkg.github.com/BusHero/index.json \ | |
| --name github \ | |
| --username BusHero \ | |
| --password ${{ secrets.GITHUB_TOKEN }} \ | |
| --store-password-in-clear-text | |
| dotnet restore | |
| - run: dotnet build --no-restore | |
| - run: dotnet test --no-build --no-restore |