[Snyk] Security upgrade node-sass from 6.0.1 to 7.0.1 #1390
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: Tests CI | |
on: | |
push: | |
branches: | |
- develop | |
- main | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18.12.1" | |
- name: Install dependencies | |
run: npm ci | |
- name: Validate code is well-formatted | |
run: npm run validate | |
- name: Validate tests are successful | |
run: npm run test:ci | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Analyze the code | |
id: scc | |
uses: iryanbell/scc-docker-action@v1.0.1 | |
with: | |
args: ${{ github.workspace }} -i ts,js,mjml | |
- uses: returntocorp/semgrep-action@v1 | |
with: | |
publishToken: ${{ secrets.SEMGREP_APP_TOKEN }} | |
- name: Set environment variables | |
run: | | |
case "${GITHUB_REF}" in | |
"refs/heads/main") DEPLOY_ENV=production ;; | |
"refs/heads/develop") DEPLOY_ENV=development ;; | |
*) DEPLOY_ENV= ;; | |
esac | |
echo "DEPLOY_ENV=${DEPLOY_ENV}" | |
echo "DEPLOY_ENV=${DEPLOY_ENV}" >> $GITHUB_ENV | |
- name: Create Sentry release | |
uses: getsentry/action-release@v1 | |
env: | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
SENTRY_ORG: aswnn | |
SENTRY_PROJECT: nfl-pool-be | |
with: | |
environment: ${{ env.DEPLOY_ENV }} | |
- name: Tests ✅ | |
if: ${{ success() }} | |
run: | | |
curl --request POST --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --header 'content-type: application/json' --data '{ | |
"context": "tests", | |
"state": "success", | |
"description": "Tests passed", | |
"target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
}' | |
- name: Tests 🚨 | |
if: ${{ failure() }} | |
run: | | |
curl --request POST --url https://api.github.com/repos/${{ github.repository }}/statuses/${{ github.sha }} --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' --header 'content-type: application/json' --data '{ | |
"context": "tests", | |
"state": "failure", | |
"description": "Tests failed", | |
"target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
}' | |
- name: Notify Slack | |
if: always() | |
uses: kpritam/slack-job-status-action@v1 | |
with: | |
job-status: ${{ job.status }} | |
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }} | |
channel: nfl-pool-be |