Skip to content

Edit fix

Edit fix #175

Workflow file for this run

name: Docker Image CI
on:
pull_request:
branches:
- main
- dev
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- uses: isbang/[email protected]
with:
compose-file: "compose.yml"
- name: Wait for containers to start
run: |
sleep 100
docker run \
--rm \
--network mercury-project_default \
alpine/curl -o /dev/null --retry 3 --retry-connrefused backend:5000
- name: Test the backend
run: cd backend; npm i && npm run test run
- name: Format files
run: npm i && npm run prettier:fix
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply formatting
branch: ${{ github.head_ref }}
cypress:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- uses: isbang/[email protected]
with:
compose-file: "compose.yml"
- name: Run Cypress Tests
run: cd frontend; npm i && npm run cy:run