.github/workflows/cicd.yml
name: CI/CD
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/
- name: Environment log
id: env
run: |
node --version
yarn --version
- name: Install dependecies
run: |
yarn install --frozen-lockfile
- name: Run build process
run: |
yarn build
- name: Run testing
run: |
yarn test
- name: Upload test coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
# - name: Publish
# run: |
# npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.npm_token}}