Skip to content

Merge pull request #1354 from OpenGeoscience/map-corners #1172

Merge pull request #1354 from OpenGeoscience/map-corners

Merge pull request #1354 from OpenGeoscience/map-corners #1172

Workflow file for this run

name: Build and test
on:
push:
# branches:
# - master
pull_request:
branches:
- master
release:
types:
- created
schedule:
- cron: "0 7 * * 1"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- uses: browser-actions/setup-firefox@latest
- run: sudo apt-get install --yes --no-install-recommends optipng imagemagick build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- run: sudo apt-get remove --yes fonts-lato
- run: fc-list
- run: firefox --version
- run: google-chrome --version
- run: npm ci
- run: npm run setup-website
- run: npm run ci-xvfb
- run: npm run ci-build-website
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: false
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: On failure, create alternate baseline images in case the new behavior is correct
if: ${{ failure() }}
run: |
pip3 install girder_client
python3 tests/runners/baseline_images.py -cevb _build
- name: Upload test images on failure
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: images
path: |
_build/images
_build/Baseline*tgz
- name: Upload artifacts
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: dist
path: |
dist/apidocs
dist/built
- name: Upload built website
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: website
path: |
website/public
unpinned:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Don't pin version to test with the latest common version
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: npm --version && node --version
- uses: browser-actions/setup-firefox@latest
- run: sudo apt-get install --yes --no-install-recommends optipng imagemagick build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- run: sudo apt-get remove --yes fonts-lato
- run: fc-list
- run: firefox --version
- run: google-chrome --version
# Delete the package-lock to test with the latest libraries allowed
- run: rm package-lock.json
- run: npm install
- run: npm audit --audit-level high
- run: npm run setup-website
- run: npm run ci-xvfb
- run: npm run ci-build-website
deploy-website:
if: ${{ github.ref == 'refs/heads/master' }}
needs: build
runs-on: ubuntu-latest
steps:
- name: Import artifacts
uses: actions/download-artifact@v4
with:
name: website
path: website/public
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: website/public
force_orphan: true
deploy-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- run: sudo apt-get install --yes --no-install-recommends optipng imagemagick build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- run: npm ci
- name: Import artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Install semantic-release
run: npm install semantic-release --no-save
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release