Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci/cd): test GHA workflow #1

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Run all tests

on:
push:
branches: [master, develop]
pull_request: {}
workflow_dispatch:

env:
SUDFA_BACKEND_BASE_URL: "https://sudfa-media-payload.vercel.app/api/" # Not needed for tests but must not be undefined
NODEMAILER_EMAIL: ${{ secrets.NODEMAILER_EMAIL }}
NODEMAILER_PASS: ${{ secrets.NODEMAILER_PASS }}
NODEMAILER_SERVICE: ${{ secrets.NODEMAILER_SERVICE }}
BASE_URL: "http://localhost:3000"

jobs:
cypress-run:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
# Install npm dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v6
with:
start: yarn dev
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ Pour utiliser Payload, il suffit de fournir l'url de l'API dans la variable `SUD
## Déploiement

Le projet est automatiquement déployé sur Netlify lors du push sur la branche master.

## Tests e2E

Des tests e2e sur Cypress ont été ajoutés, notamment pour tester le formulaire de contact.
Loading