codecov parcial #173
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 / CD | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- uses: actions/checkout@v4 | |
- run: cd front; npm install; cd .. | |
- run: cd front; npm run build; cd .. | |
- run: npm install | |
- run: npx playwright install --with-deps | |
- run: npm install --save-dev jest @playwright/test jest-playwright-preset | |
- run: npm test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: '${{ secrets.CODECOV_TOKEN }}' | |
slug: gti-sos/SOS2324-14 | |
deploy: | |
needs: [test] | |
runs-on: ubuntu-latest | |
environment: production | |
steps: | |
- uses: actions/checkout@v2 | |
- id: 'auth' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
credentials_json: '${{ secrets.GCP_SA_KEY_JSON }}' | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v1' | |
- name: 'Use gcloud CLI' | |
run: 'gcloud info' | |
- run: cd front; npm install; cd .. | |
- run: cd front; npm run build; cd .. | |
- name: Deploy | |
run: gcloud app deploy |