feat: adds undo logic for tasks deletion in golang backend #46
Workflow file for this run
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: Build and Run Tests | |
on: | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
# TODO - Optimize. Build images only once. | |
# For example, webapp-next is built 3 times now: | |
# In build job and once for each backend when testing e2e | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
service: | |
[ | |
backend-golang-rest, | |
backend-js-rest, | |
webapp-golang-htmx, | |
webapp-nextjs, | |
e2e-cypress, | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Docker image | |
run: docker build -t ${{ matrix.service }} ${{ matrix.service }} | |
e2e: | |
runs-on: ubuntu-latest | |
needs: build | |
strategy: | |
matrix: | |
e2e_runner: [cypress] | |
frontend: [next, golang-htmx] | |
backend: [go, js] | |
db: [inmemory, mongo] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: extractions/setup-just@v2 | |
- uses: KengoTODA/actions-setup-docker-compose@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: echo "${{ secrets.DOT_ENV }}" > .env | |
- name: Run E2E tests | |
run: just test-${{ matrix.e2e_runner }}-${{ matrix.frontend }}-${{ matrix.backend }}-${{ matrix.db }} | |
- name: Upload test screenshots | |
uses: actions/upload-artifact@v2 | |
with: | |
name: e2e-screenshots-${{ matrix.e2e_runner }}-${{ matrix.frontend }}-${{ matrix.backend }} | |
path: cypress/screenshots |