Skip to content

MinZoom

MinZoom #526

Workflow file for this run

name: Test
on:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:
- master
jobs:
npmtest:
name: Run npm tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Read .nvmrc
# See <https://remarkablemark.org/blog/2021/03/11/setup-nodejs-with-nvmrc-in-github-actions/>
# # And <https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-output-parameter>
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT
id: nvmrc
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvmrc.outputs.NODE_VERSION }}
- name: Install node modules as specified in lockfile
run: npm ci
- name: Install latest vg release
# See https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8 for how we pull out the right URL
run: |
mkdir -p bin
curl -sSL "$(curl -sSL https://api.github.com/repos/vgteam/vg/releases/latest | grep 'browser_download_url.*vg"' | cut -d ':' -f 2,3 | tr -d '"' | sed 's/^ *//g')" >bin/vg
chmod +x bin/vg
- name: Run tests
run: PATH=$PATH:$(pwd)/bin CI=true npm run test
- name: Test build
run: npm run build