modif
This commit is contained in:
parent
c682339801
commit
19bea47aaa
1 changed files with 34 additions and 0 deletions
34
.github/workflows/ci.yml
vendored
Normal file
34
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
cypress-tests:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
- name: Run Cypress tests
|
||||||
|
run: npx cypress run
|
||||||
|
- name: Notify Discord
|
||||||
|
if: always()
|
||||||
|
env:
|
||||||
|
DISCORD_WEBHOOK: https://discord.com/api/webhooks/1392833606929612861/CLMuEb_EKVSZA8JP83MuWNIGHkAqXgxxEvl1ONLWBktcEOv7ejX2z0tsq5okDTD4X81Z
|
||||||
|
run: |
|
||||||
|
STATUS=""
|
||||||
|
if [ ${{ job.status }} = 'success' ]; then
|
||||||
|
STATUS="✅ Les tests Cypress sont passés avec succès !"
|
||||||
|
else
|
||||||
|
STATUS="❌ Les tests Cypress ont échoué."
|
||||||
|
fi
|
||||||
|
curl -H "Content-Type: application/json" -X POST -d "{\"content\": \"$STATUS\"}" "$DISCORD_WEBHOOK"
|
||||||
Loading…
Add table
Reference in a new issue