Bump actions/cache from 5 to 6 #341
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - "master" | |
| pull_request: | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| nim: ["2.2.4", "stable", "devel"] | |
| gc: | |
| - refc | |
| - orc | |
| os: ["ubuntu-latest"] | |
| include: | |
| - os: windows-latest | |
| nim: "stable" | |
| gc: "orc" | |
| runs-on: ${{ matrix.os }} | |
| name: Nim ${{ matrix.os }} ${{ matrix.nim }} ${{ matrix.gc }} test | |
| steps: | |
| - name: Setup Nim Enviroment | |
| uses: actions/checkout@v6 | |
| - uses: jiro4989/setup-nim-action@v2 | |
| with: | |
| use-nightlies: true | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| nim-version: ${{ matrix.nim }} | |
| - name: Cache choosenim | |
| id: cache-choosenim | |
| uses: actions/cache@v6 | |
| with: | |
| path: ~/.nimble | |
| key: nimble-v2-${{ hashFiles('*.nimble') }} | |
| - name: Setup nim environment | |
| run: nimble setup -y | |
| - name: Run Tests | |
| run: nimble --mm:${{ matrix.gc }} test | |
| - name: Check example | |
| if: matrix.nim == 'devel' | |
| run: nim c --warningAsError:UnusedImport:on --hintAsError:DuplicateModuleImport:on --errorMax:0 --mm:${{ matrix.gc }} example.nim | |
| - name: Test doc examples | |
| run: nimble --mm:${{ matrix.gc }} doc --project src/mike.nim | |
| deploy: | |
| needs: test | |
| permissions: | |
| pages: write # To deploy to Pages | |
| id-token: write # Verify deployment | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/master' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: "Setup nim" | |
| uses: jiro4989/setup-nim-action@v2 | |
| - name: "Build documentation" | |
| uses: ire4ever1190/nim-docs-action@v2 | |
| with: | |
| main-file: "src/mike.nim" | |
| deploy: "pages" | |
| versions: "stable HEAD" |