Merge pull request #752 from Kitware/dependabot/npm_and_yarn/socket.i… #276
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: Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
run: | | |
npm ci | |
sudo apt-get install xvfb | |
- name: Download testing data | |
shell: bash | |
run: | | |
curl -OL https://github.com/Kitware/itk-vtk-viewer/releases/download/v14.35.1/itk-vtk-viewer-testing-data.tar.gz | |
tar xvzf ./itk-vtk-viewer-testing-data.tar.gz -C test/ | |
rm ./itk-vtk-viewer-testing-data.tar.gz | |
- name: Build | |
run: npm run build | |
- name: Chrome and Firefox tests | |
run: | | |
# Failing based on vtk.js piecewisegaussian? | |
# xvfb-run --auto-servernum npm run test -- --browsers Chrome,Firefox | |
# Allow writing test/output.html | |
sudo chmod -R 777 test | |
# To debug, run `./test/run.sh -d` | |
npm run test:headless | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
git config --global user.name "Github Actions" | |
git config --global user.email "[email protected]" | |
npm run semantic-release | |
- name: Publish docs | |
if: github.ref == 'refs/heads/master' | |
env: | |
GIT_PUBLISH_URL: https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/Kitware/itk-vtk-viewer.git | |
run: npm run doc:publish |