chore(deps): bump @babel/traverse from 7.22.8 to 7.23.2 in /docs #122
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: Test API and lint code | |
on: | |
workflow_dispatch: | |
push: | |
branches: [master] | |
pull_request_target: | |
branches: | |
- master | |
env: | |
API_TOKEN: ${{ secrets.API_TOKEN }} | |
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | |
MERCHANT_NAME: ${{ secrets.MERCHANT_NAME }} | |
MERCHANT_CODE: ${{ secrets.MERCHANT_CODE }} | |
jobs: | |
lint: | |
name: Lint code | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: 'npm' | |
cache-dependency-path: package-lock.json | |
- name: Install depedencies | |
run: npm ci | |
- name: Lint code | |
run: npm run lint | |
test: | |
needs: lint | |
name: Test API Library | |
runs-on: ubuntu-latest | |
permissions: | |
checks: write | |
pull-requests: write | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
cache: 'npm' | |
cache-dependency-path: package-lock.json | |
- name: Install depedencies | |
run: npm ci | |
- name: Test and make coverage | |
run: npm run test:coverage | |
- name: Create Coverage Badges | |
uses: jaywcjlove/coverage-badges-cli@main | |
with: | |
style: flat | |
source: coverage/coverage-summary.json | |
output: coverage/badges.svg | |
- name: Deploy Test | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/master' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./coverage | |