Skip to content

Add new job "run-ui-tests" to CI/CD workflow #4

Add new job "run-ui-tests" to CI/CD workflow

Add new job "run-ui-tests" to CI/CD workflow #4

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: CI/CD system
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Use Node.js 18.*
uses: actions/setup-node@v3
with:
node-version: 18.*
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Run Unit tests
run: npm run test:unit
- name: Display SoftUni username
run: echo "dennikolova"
deploy:
needs: build-test
runs-on: ubuntu-latest
steps:
- name: Deploy to production
uses: johnbeynon/render-deploy-action@v0.0.8
with:
service-id: ${{ secrets.MY_RENDER_SERVICE_ID }}
api-key: ${{ secrets.MY_RENDER_API_KEY }}
run-ui-tests:
needs: deploy
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Use Node.js 18.*
uses: actions/setup-node@v3
with:
node-version: 18.*
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Install Playwright
run: npx playwright
- name: Run UI tests
run: npm run test:ui