Feature github actions #1
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: Devpulse CI | |
on: | |
push: | |
branches: [ develop ] | |
pull_request: | |
branches: [ develop ] | |
jobs: | |
test-and-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run linter | |
run: npm run lint | |
- name: Run tests | |
run: npm test | |
- name: Build | |
run: npm run build | |
- name: Upload test coverage to Code Climate | |
uses: paambaati/codeclimate-action@v5.0.0 | |
env: | |
CODECLIMATE_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TEST_REPORTER_ID }} | |
with: | |
coverageCommand: npm test -- --coverage | |
debug: true | |
# - name: Deploy | |
# if: success() | |
# run: | | |
# # The deployment script goes here | |
# env: | |
# # All necessary deployment environment variables goes here | |
# # DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }} |