fix : workflow #9
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
# 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: OptimumERP | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
MONGO_URI: ${{ secrets.MONGO_URI }} | |
SESSION_SECRET: ${{ secrets.SESSION_SECRET }} | |
NODE_MAILER_USER_NAME: ${{ secrets.NODE_MAILER_USER_NAME }} | |
NODE_MAILER_APP_PASSWORD: ${{ secrets.NODE_MAILER_APP_PASSWORD }} | |
NODE_MAILER_HOST: ${{ secrets.NODE_MAILER_HOST }} | |
jobs: | |
build: | |
runs-on: self-hosted | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install and Test backend | |
working-directory: ./backend | |
run: | | |
npm install | |
- name: Install and Test frontend | |
working-directory: ./frontend | |
run: | | |
npm install | |
export MONGO_URI=$MONGO_URI | |
export SESSION_SECRET=$SESSION_SECRET | |
export NODE_MAILER_USER_NAME=$NODE_MAILER_USER_NAME | |
export NODE_MAILER_APP_PASSWORD=$NODE_MAILER_APP_PASSWORD | |
export NODE_MAILER_HOST=$NODE_MAILER_HOST |