chore: update ci with timeout response #7
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 Pipeline | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '14' | |
- name: Install Dependencies | |
run: npm install | |
- name: Build Project | |
run: npm run build | |
- name: Run Tests | |
run: npm test | |
- name: Static Code Analysis | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/snyk | |
key: | |
${{ runner.os }}-snyk-${{ hashFiles('**/snyk-test-report.json') }} | |
restore-keys: | | |
${{ runner.os }}-snyk- | |
- name: Security Scanning | |
uses: snyk/actions/node@master | |
with: | |
args: test | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
timeout-minutes: 5 | |
# Do not have an access key for AWS | |
# deploy: | |
# runs-on: ubuntu-latest | |
# needs: build | |
# steps: | |
# - name: Checkout Code | |
# uses: actions/checkout@v2 | |
# - name: Deploy to S3 | |
# env: | |
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
# run: | | |
# aws s3 sync . s3://my-bucket --delete |