Temp test on this branch #253
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: Tests | |
on: | |
push: | |
branches: | |
- "master" | |
- "fix/57" | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
nim: ['1.6.12', 'stable', 'devel'] | |
gc: ['refc', 'orc'] | |
os: ["ubuntu-latest", "windows-latest"] | |
runs-on: ${{ matrix.os }} | |
name: Nim ${{ matrix.os }} ${{ matrix.nim }} ${{ matrix.gc }} test | |
steps: | |
- name: Setup Nim Enviroment | |
uses: actions/checkout@v3 | |
- 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@v1 | |
with: | |
path: ~/.nimble | |
key: nimble-v2-${{ hashFiles('*.nimble') }} | |
- if: ${{ steps.cache-choosenim.outputs.cache-hit != 'true' }} | |
name: Install nim dependencies | |
continue-on-error: true | |
run: nimble update && nimble build | |
- 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 --mm:${{ matrix.gc }} example.nim | |
- name: Test doc examples | |
run: nimble --mm:${{ matrix.gc }} doc --warningAsError:BrokenLink:on --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@v4 | |
- name: "Setup nim" | |
uses: jiro4989/setup-nim-action@v2 | |
- name: "Build documentation" | |
uses: ire4ever1190/nim-docs-action@v1 | |
with: | |
main-file: "src/mike.nim" | |
deploy: "pages" |