Skip to content

CI

CI #1689

Workflow file for this run

name: CI
on:
push:
branches: [develop]
pull_request:
branches: [develop]
jobs:
build-and-test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [16.x, 18.x, 20.x]
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: Unit tests
run: npm run test
- name: Unit tests refactoring
run: npm run test-refactoring
- name: Merge lcov
if: ${{ matrix.node-version == '16.x' && matrix.os == 'ubuntu-latest' }}
run: npm run merge-lcov
- name: Sonarcloud
if: ${{ matrix.node-version == '16.x' && matrix.os == 'ubuntu-latest' }}
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Angular expo test
if: ${{ matrix.node-version == '16.x' && matrix.os == 'ubuntu-latest' }}
run: npm run angularexpo
e2e:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
node-version: [16.x]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- uses: saucelabs/sauce-connect-action@v2
with:
username: ${{ secrets.SAUCE_USERNAME }}
accessKey: ${{ secrets.SAUCE_ACCESS_KEY }}
tunnelIdentifier: github-action-tunnel
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install Dependencies
run: npm ci
- name: Build
run: npm run build
- name: E2E tests
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: npm run saucelabs-test-e2e-mocha