Merge pull request #12 from halimath/refactor/backend-architecture #69
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: | |
jobs: | |
frontend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install dependencies | |
run: npm i | |
working-directory: app | |
- name: Build assembly | |
run: npm run build | |
working-directory: app | |
backend: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22" | |
- name: Create dummy frontend | |
run: touch internal/web/public | |
working-directory: backend | |
- name: Run tests | |
run: go test ./... -cover | |
working-directory: backend | |
e2etests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.12" | |
- name: Start app | |
run: docker compose up -d --build | |
working-directory: e2e-tests | |
- name: Run image | |
uses: abatilo/actions-poetry@v2 | |
with: | |
poetry-version: "1.8.2" | |
- name: Install dependencies | |
run: poetry install | |
working-directory: e2e-tests | |
- name: Install playwright browsers | |
run: poetry run playwright install | |
working-directory: e2e-tests | |
- name: Run tests | |
run: poetry run pytest | |
working-directory: e2e-tests | |
- name: Stop app | |
run: docker compose down | |
working-directory: e2e-tests | |