ci: adds linting and formatting jobs to on pull request workflow #349
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: Run Tests | |
on: | |
workflow_call: | |
workflow_dispatch: | |
pull_request: | |
env: | |
API_KEY: ${{ secrets.API_KEY }} | |
APP_ID: ${{ secrets.APP_ID }} | |
APP_TOKEN: ${{ secrets.APP_TOKEN }} | |
EXAMPLE_USER_ID: ${{ secrets.EXAMPLE_USER_ID }} | |
PUBLIC_KEY: ${{ secrets.PUBLIC_KEY }} | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: npm i | |
- name: Lint | |
run: npm run lint:ci | |
format: | |
name: Format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: npm i | |
- name: Format | |
run: npm run format:ci | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: npm i | |
- name: Test | |
run: npm test |