[tests] update test cases sensitive to text placement #486
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: ggplotnim CI | |
on: | |
push: | |
paths: | |
- 'tests/**' | |
- 'src/**' | |
- 'ggplotnim.nimble' | |
- '.github/workflows/ci.yml' | |
pull_request: | |
paths: | |
- 'tests/**' | |
- 'src/**' | |
- 'ggplotnim.nimble' | |
- '.github/workflows/ci.yml' | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
branch: [version-2-0, version-1-6, devel] | |
target: [linux, macos, windows] | |
include: | |
- target: linux | |
builder: ubuntu-latest | |
- target: macos | |
builder: macos-latest | |
- target: windows | |
builder: windows-latest | |
name: '${{ matrix.target }} (${{ matrix.branch }})' | |
runs-on: ${{ matrix.builder }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
path: ggplotnim | |
- name: Setup Nim | |
uses: alaviss/[email protected] | |
with: | |
path: nim | |
version: ${{ matrix.branch }} | |
- name: Install dependencies (Ubuntu) | |
if: ${{matrix.target == 'linux'}} | |
run: | | |
sudo apt-get update | |
sudo apt-get install libcairo2 libcairo2-dev imagemagick \ | |
libgtk-3-dev webkit2gtk-driver \ | |
libwebkit2gtk-4.0 libwebkit2gtk-4.0-dev pandoc | |
- name: Install dependencies (OSX) | |
if: ${{matrix.target == 'macos'}} | |
run: | | |
brew install imagemagick cairo | |
- name: Setup MSYS2 (Windows) | |
if: ${{matrix.target == 'windows'}} | |
uses: msys2/setup-msys2@v2 | |
with: | |
path-type: inherit | |
update: true | |
install: base-devel git mingw-w64-x86_64-toolchain | |
- name: Install dependencies (Windows) | |
if: ${{matrix.target == 'windows'}} | |
shell: msys2 {0} | |
run: | | |
pacman -Syu --noconfirm | |
pacman -S --needed --noconfirm mingw-w64-x86_64-cairo | |
pacman -S --needed --noconfirm mingw-w64-x86_64-lapack | |
- name: Setup nimble & deps | |
shell: bash | |
run: | | |
# limit our stack size to avoid regressing after PR #36 w/o noticing | |
ulimit -s 1024 | |
cd ggplotnim | |
nimble refresh -y | |
nimble install ntangle -y | |
nimble install -y | |
- name: Run tests (Linux & Mac) | |
if: ${{matrix.target != 'windows'}} | |
shell: bash | |
run: | | |
cd ggplotnim | |
nimble -y fullTest | |
nimble -y testCI | |
- name: Run tests (Windows) | |
if: ${{matrix.target == 'windows'}} | |
shell: msys2 {0} | |
run: | | |
cd ggplotnim | |
nimble -y fullTest | |
nimble -y testCI | |
- name: Build docs | |
if: > | |
github.event_name == 'push' && github.ref == 'refs/heads/master' && | |
matrix.target == 'linux' && matrix.branch == 'devel' | |
shell: bash | |
run: | | |
cd ggplotnim | |
# **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: ggplotnim/docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |