Update deploy-image.yml (#71) #315
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: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./app/ | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Node environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "19" | |
- name: install dependencies | |
run: npm install | |
- name: install puppeteer | |
run: | | |
sudo apt-get update | |
sudo apt-get install -yq libgconf-2-4 | |
sudo apt-get install -y wget xvfb --no-install-recommends | |
sudo wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add - | |
sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' | |
sudo apt-get install -y google-chrome-stable --no-install-recommends | |
sudo rm -rf /var/lib/apt/lists/* | |
sudo Xvfb -ac :99 -screen 0 1280x1024x16 > /dev/null 2>&1 & | |
env: | |
DISPLAY: :99.0 | |
PUPPETEER_EXEC_PATH: "google-chrome-stable" | |
- name: run tests | |
run: | | |
sudo chown -R 1001:121 "/root/.npm" | |
npm run test | |
env: | |
DISPLAY: :99.0 | |
PUPPETEER_EXEC_PATH: "google-chrome-stable" |