Skip to content

build(deps): bump semver from 5.7.1 to 5.7.2 #122

build(deps): bump semver from 5.7.1 to 5.7.2

build(deps): bump semver from 5.7.1 to 5.7.2 #122

Workflow file for this run

name: Test changes
on: pull_request
# push:
# branches:
# - master
jobs:
lint-js:
name: "Javascript Linter Check"
runs-on: ubuntu-latest
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
- name: "Install Node"
uses: actions/setup-node@v3
with:
node-version: 16
- name: "Install Dependencies"
run: npm install
- name: "Linter Check (ESLint)"
run: npm run lint
lint-py:
name: "Python Linter Check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: psf/black@23.1.0
with:
src: "./py"
version: 23.1.0
- name: Check for Linting Errors
if: failure()
run: echo "::warning title='Python Linter Check failed'::Please run \"pip install black; black py\" before committing code changes to python files."
install-and-build:
name: "Install and Build"
runs-on: ubuntu-latest
outputs:
jsfileschanged: ${{ steps.checkout.outputs.jsfileschanged }}
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
- uses: ./.github/actions/prepare
with:
loadprbuild: false
# count changed js files (diff to base branch)
- name: "Count changed JS-Files"
id: checkout
run: |
git fetch origin $GITHUB_BASE_REF
echo "Target branch : $GITHUB_BASE_REF"
git diff --name-only origin/$GITHUB_BASE_REF --
echo 'jsfileschanged='$(git diff --name-only origin/$GITHUB_BASE_REF -- | grep '^js/*' | wc -l) >> $GITHUB_OUTPUT
echo 'Num js files changed='$(git diff --name-only origin/$GITHUB_BASE_REF -- | grep '^js/*' | wc -l)
- name: "Build Project (PR version)"
run: |
npm run build
if: steps.checkout.outputs.jsfileschanged > 0
- name: "Save built js-files"
uses: actions/upload-artifact@v3
with:
name: pr-build
if-no-files-found: error
path: |
./py/visdom/static/js/main.js
./py/visdom/static/js/main.js.map
visual-regression-test-init:
name: "Initialize Visual Regression Test"
runs-on: ubuntu-latest
needs: install-and-build
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
- name: "Save current Head-Ref as PR-branch"
shell: bash
run: |
git checkout -B PR-HEAD
- uses: ./.github/actions/prepare
with:
usebasebranch: true
loadprbuild: false
- name: "Checkout Tests from Head-Ref"
shell: bash
run: |
git checkout PR-HEAD -- ./cypress
git checkout PR-HEAD -- ./example
- name: Cypress test:init
uses: cypress-io/github-action@v4
with:
install: false
start: visdom -port 8098 -env_path /tmp
wait-on: 'http://localhost:8098'
spec: cypress/integration/*.init.js
- uses: actions/upload-artifact@v3
with:
name: cypress-init-screenshots
path: cypress/screenshots_init
visual-regression-test:
name: "Visual Regression Test"
runs-on: ubuntu-latest
needs: visual-regression-test-init
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
- uses: ./.github/actions/prepare
- uses: actions/download-artifact@v3
with:
name: cypress-init-screenshots
path: cypress/screenshots_init
- name: Cypress test:visual
uses: cypress-io/github-action@v4
with:
install: false
start: visdom -port 8098 -env_path /tmp
wait-on: 'http://localhost:8098'
spec: cypress/integration/screenshots.js
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots-visual
path: cypress/screenshots
funcitonal-test:
name: "Functional Test (Websocket)"
runs-on: ubuntu-latest
needs: install-and-build
strategy:
matrix:
python: ['3.8', '3.9', '3.10']
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
- uses: ./.github/actions/prepare
- name: Cypress test
uses: cypress-io/github-action@v4
with:
install: false
start: visdom -port 8098 -env_path /tmp
wait-on: 'http://localhost:8098'
config: ignoreTestFiles=screenshots.*
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots-functional
path: cypress/screenshots
funcitonal-test-polling:
name: 'Functional Test (Polling)'
runs-on: ubuntu-latest
needs: install-and-build
steps:
- name: 'Checkout Repository'
uses: actions/checkout@v3
- uses: ./.github/actions/prepare
- name: Cypress test
uses: cypress-io/github-action@v4
with:
install: false
start: visdom -port 8098 -env_path /tmp -use_frontend_client_polling
wait-on: 'http://localhost:8098'
config: ignoreTestFiles=screenshots.*
- uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots-functional-polling
path: cypress/screenshots