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: update node and npm #118

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft
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
80 changes: 80 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
# Continuous Integration/Delivery
name: cicd

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-18.04
env:
SAM_CLI_TELEMETRY: "0"
AWS_REGION: "eu-central-1"
AWS_DEFAULT_REGION: "eu-central-1"
LOG_PATH: /tmp/debug-logs
PIP_LOG_FILE: /tmp/pip.log
NODE_OPTIONS: "--max_old_space_size=7000"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.7
- name: Install Dependencies Python
id: install_python
run: |
mkdir "$LOG_PATH"
pip install --upgrade pip cloudformation-cli-typescript-plugin
curl -s -L https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-x86_64.zip -o sam.zip
unzip -q sam.zip -d ../sam-install
sudo ../sam-install/install --update
- uses: actions/setup-node@v3
with:
node-version: 14
cache: ''
- name: Install Dependencies Node.js
id: install_nodejs
run: |
npm run bootstrap -- --ci && npm run build
- name: Run Automated Testing
id: automated_testing
run: |
npm run lint
npm run test:ci
- name: Upload Coverage
id: codecov
run: |
curl -s https://codecov.io/bash > codecov.sh
bash codecov.sh -f coverage/coverage-final.json -F unittests
- name: Upload Coverage Artifacts
id: upload_coverage
uses: actions/upload-artifact@v1
with:
name: coverage
path: coverage/
- name: Run Integration Tests
id: integration_testing
run: |
npm run validate > $GITHUB_WORKSPACE/rdpk.log
- name: Gather Debug Logs
id: gather_logs
continue-on-error: true
if: failure()
run: |
mkdir "$LOG_PATH/_logs" 2>&1 || :
cp -r "$(npm config get cache)/_logs" "$LOG_PATH" 2>&1 || :
cp "$GITHUB_WORKSPACE/npm-debug.log" "$LOG_PATH/_logs" 2>&1 || :
cp "$PIP_LOG_FILE" "$LOG_PATH" 2>&1 || :
cp "$GITHUB_WORKSPACE/rdpk.log" "$LOG_PATH" 2>&1 || :
- name: Upload Debug Artifacts
id: upload_logs
if: failure()
uses: actions/upload-artifact@v1
with:
name: debug-logs
path: ${{ env.LOG_PATH }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ coverage/
utils
*.zip
*.tgz
junit.xml
Loading