Skip to content

DV-000299: Move drop-down functionality. #9

DV-000299: Move drop-down functionality.

DV-000299: Move drop-down functionality. #9

Workflow file for this run

name: CI Pipeline
on:
pull_request:
branches:
- main
jobs:
backend:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.8.2
ports:
- 3306:3306
env:
MYSQL_USER: ${{ secrets.MYSQL_USER }}
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
MYSQL_DATABASE: ${{ secrets.MYSQL_DATABASE }}
MYSQL_ROOT_PASSWORD: ${{ secrets.MYSQL_ROOT_PASSWORD }}
options: --health-cmd="mysqladmin ping --silent" --health-interval=5s --health-timeout=2s --health-retries=3
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Wait for MariaDB to be ready
run: |
for i in {1..30}; do
if mysqladmin ping -h127.0.0.1 --silent; then
echo "MariaDB is up!";
break;
fi
echo "Waiting for MariaDB...";
sleep 1;
done
- name: Setup Java 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.4.2
- name: Build and Test Backend
env:
MYSQL_USER: ${{ secrets.MYSQL_USER }}
MYSQL_PASSWORD: ${{ secrets.MYSQL_PASSWORD }}
REACT_APP_API_KEY: ${{ secrets.REACT_APP_API_KEY }}
REACT_APP_TOKEN: ${{ secrets.REACT_APP_TOKEN }}
run: gradle clean build test
frontend:
runs-on: ubuntu-latest
needs: backend
strategy:
matrix:
node-version: [ 18.x ]
os: [ ubuntu-latest ]
browser: [ chrome, firefox ]
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci --force
- name: Install Compose
uses: ndeloof/[email protected]
with:
legacy: true
version: v2.1.0
- name: Start Docker Containers
run: |
docker-compose up --detach --build
docker-compose exec -T app wait-for-it localhost
- name: Run Cypress Smoke Tests
uses: cypress-io/github-action@v4
with:
command: npm run cypress:run:smoke:test -- --browser ${{ matrix.browser }}
parallel: true
- name: Run Cypress Sanity Tests
uses: cypress-io/github-action@v4
with:
command: npm run cypress:run:sanity:test -- --browser ${{ matrix.browser }}
parallel: true
- name: Generate Allure Report
uses: simple-elf/allure-report-action@master
if: always()
with:
allure_results: allure-results
- name: Deploy Allure Report to GitHub Pages
if: always()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: allure-report
- name: Stop Docker Containers
if: always()
run: docker-compose down