Skip to content

Commit

Permalink
chore: lint and test on deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelSolati authored Jul 10, 2020
1 parent ee910ec commit 487fe57
Showing 1 changed file with 17 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
name: Deploy
name: Lint, Test, and Deploy
on:
push:
tags:
- v*
env:
COVERALLS_REPO_TOKEN: "${{ secrets.COVERALLS_REPO_TOKEN }}"
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
NPM_EMAIL: ${{ secrets.NPM_EMAIL }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
deploy_to_npm:
name: Deploy to NPM
lint_test_and_deploy:
name: Lint, Test, and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -19,7 +20,7 @@ jobs:
with:
node-version: 12.x
registry-url: https://registry.npmjs.org/
- name: Register Token
- name: Register NPM Token
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > /home/runner/work/_temp/.npmrc
echo "_auth=$NPM_TOKEN" >> /home/runner/work/_temp/.npmrc
Expand All @@ -32,33 +33,20 @@ jobs:
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
- name: NPM Install
run: npm install --ignore-scripts
- name: Install Firebase Tools
run: npm i -g firebase-tools
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Coverage
run: npm run coverage
- name: Build
run: npm run build
- name: Deploy
- name: NPM Publish
run: npm publish
deploy_to_firebase:
name: Deploy to Firebase
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: NPM Cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
run: npm install --ignore-scripts
- name: Install Firebase Tools
run: npm i -g firebase-tools
- name: Deploy
- name: Firebase Deploy
run: firebase deploy --non-interactive --token $FIREBASE_TOKEN


0 comments on commit 487fe57

Please sign in to comment.