[CI] run devel instead of stable #374
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: datamancer CI | |
on: | |
push: | |
paths: | |
- 'tests/**' | |
- 'src/**' | |
- 'docs/**' | |
- 'datamancer.nimble' | |
- '.github/workflows/ci.yml' | |
pull_request: | |
paths: | |
- 'tests/**' | |
- 'src/**' | |
- 'docs/**' | |
- 'datamancer.nimble' | |
- '.github/workflows/ci.yml' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
nim: | |
- '1.6.x' | |
- '2.0.x' | |
- 'devel' | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macOS-latest | |
name: '${{ matrix.nim }} (${{ matrix.os }})' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
path: datamancer | |
- name: Setup nim | |
uses: jiro4989/setup-nim-action@v1 | |
with: | |
nim-version: ${{ matrix.nim }} | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies (Ubuntu) | |
if: ${{matrix.target == 'linux'}} | |
run: | | |
sudo apt-get update | |
sudo apt-get install pandoc | |
- name: Setup nimble & deps | |
shell: bash | |
run: | | |
cd datamancer | |
nimble refresh -y | |
nimble install -y | |
- name: Run tests | |
shell: bash | |
run: | | |
cd datamancer | |
nimble -y test | |
nimble -y testJs | |
- name: Build docs | |
if: > | |
github.event_name == 'push' && github.ref == 'refs/heads/master' && | |
matrix.target == 'linux' && matrix.branch == 'devel' | |
shell: bash | |
run: | | |
cd datamancer | |
# **HAVE** to call `develop`, cuz we're getting screwed by | |
# logic otherwise | |
nimble develop -y | |
nimble gen_docs | |
# TODO: fix this, need to iterate over all files, do similar to arraymancer docs | |
# Ignore failures for older Nim | |
cp docs/{the,}index.html || true | |
- name: Publish docs | |
if: > | |
github.event_name == 'push' && github.ref == 'refs/heads/master' && | |
matrix.target == 'linux' && matrix.branch == 'devel' | |
uses: crazy-max/ghaction-github-pages@v1 | |
with: | |
build_dir: datamancer/docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |