retry front jest test, try to turn on back to test front jest #4
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
name: CI | |
on: | |
push: | |
branches: [test] | |
pull_request: | |
branches: [test] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
- name: Install front dependencies | |
run: cd client && npm ci | |
- name: Install back dependencies | |
run: cd server && npm ci | |
- name: Run back tests | |
run: cd server && npm test | |
- name: run back server | |
run: cd server && npm watch | |
- name: Run front tests | |
run: cd client && npm test | |
- name: Build Docker images and push to Docker Hub | |
if: ${{ success() }} | |
run: | | |
docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
docker build -t your-docker-hub-username/your-frontend-image-name ./path-to-your-frontend | |
docker push your-docker-hub-username/your-frontend-image-name | |
docker build -t your-docker-hub-username/your-backend-image-name ./path-to-your-backend | |
docker push your-docker-hub-username/your-backend-image-name |