Merge pull request #209 from tcezard/EVA3542_release_count_page #139
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: Run tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.0.0] | |
env: | |
NODE_VERSION: ${{ matrix.node-version }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Update submodules | |
run: git submodule update --init | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install Chrome | |
run: | | |
sudo apt update | |
wget -O /tmp/chrome.deb https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb | |
sudo chmod +x /tmp/chrome.deb | |
sudo apt-get install /tmp/chrome.deb -y | |
- name: Install dependencies | |
run: | | |
cd lib/jsorolla | |
# PhantomJS does not ship by default with the newer node versions - So the prebuilt package needs to be downloaded first | |
$AGENT_TOOLSDIRECTORY/node/$NODE_VERSION/x64/bin/npm install -g phantomjs-prebuilt | |
$AGENT_TOOLSDIRECTORY/node/$NODE_VERSION/x64/bin/npm install | |
cd ../.. | |
# legacy-peer-deps switch is necessary to force packages to be installed even though they are not maintained | |
$AGENT_TOOLSDIRECTORY/node/$NODE_VERSION/x64/bin/npm install --legacy-peer-deps | |
- name: Run tests | |
run: | | |
$AGENT_TOOLSDIRECTORY/node/$NODE_VERSION/x64/bin/npm install -g grunt-cli | |
sudo apt install xvfb -y && Xvfb :99 & export DISPLAY=:99 | |
grunt run-all-tests --env=prod |