Skip to content

VIDCS-3291: Update contributing doc to Reflect New Develop Branch Workflow #125

VIDCS-3291: Update contributing doc to Reflect New Develop Branch Workflow

VIDCS-3291: Update contributing doc to Reflect New Develop Branch Workflow #125

Workflow file for this run

name: run-tests
on: [pull_request, workflow_dispatch]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
OT_API_KEY: ${{secrets.API_KEY}}
OT_API_SECRET: ${{secrets.API_SECRET}}
jobs:
run:
runs-on: ubuntu-22.04
steps:
- name: Check for "skip-ci" label
id: check-skip-ci
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const pr = context.payload.pull_request;
const labels = pr.labels.map(label => label.name);
return labels.includes("skip-ci");
- name: Skip CI
if: steps.check-skip-ci.outputs.result == 'true'
run: |
echo "Skipping CI :^)"
- name: Checkout
if: steps.check-skip-ci.outputs.result == 'false'
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install chrome latest
if: steps.check-skip-ci.outputs.result == 'false'
run: |
wget -q -O - https://dl.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 update && sudo apt install -y google-chrome-stable
echo "Check chrome version"
/usr/bin/google-chrome-stable --version
echo "Chrome latest downloaded and installed"
- name: Install edge latest
if: steps.check-skip-ci.outputs.result == 'false'
run: |
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-dev.list'
sudo rm microsoft.gpg
sudo apt update && sudo apt install -y microsoft-edge-stable
echo "Check edge version"
/usr/bin/microsoft-edge-stable --version
echo "Edge latest downloaded and installed"
- name: install firefox latest
if: steps.check-skip-ci.outputs.result == 'false'
run: |
sudo apt update
wget -O firefoxsetup.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US"
sudo tar -xf firefoxsetup.tar.bz2 --directory /opt
echo "Check firefox version"
/opt/firefox/firefox --version
echo "Firefox latest downloaded and installed"
- name: Install opera latest
run: |
sudo add-apt-repository 'deb https://deb.opera.com/opera-stable/ stable non-free'
wget -qO- https://deb.opera.com/archive.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install opera-stable -y
echo "Check opera version"
/usr/bin/opera --version
echo "Opera latest downloaded and installed"
- name: Setup node
if: steps.check-skip-ci.outputs.result == 'false'
uses: actions/setup-node@v3
with:
node-version: 22
cache: npm
- name: Install Dependencies
if: steps.check-skip-ci.outputs.result == 'false'
run: |
node -v
npm -v
npm install --global yarn
yarn
- name: Install electron dependencies
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-0 libx11-xcb1 libxcomposite1 libxrandr2 libxdamage1 libxi6 libxtst6 libnss3 libasound2
- name: Run unit tests
if: steps.check-skip-ci.outputs.result == 'false'
run: |
yarn test
- name: SonarCloud Scan
if: steps.check-skip-ci.outputs.result == 'false' && github.event.pull_request.head.repo.fork == false
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Run integration tests
if: steps.check-skip-ci.outputs.result == 'false' && github.event.pull_request.head.repo.fork == false
run: |
Xvfb :99 & export DISPLAY=:99
yarn test:integration