Ideas Branch #130
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: Continuous Integration | |
permissions: | |
contents: write | |
on: | |
pull_request: | |
branches: | |
- main | |
- ci-testing | |
jobs: | |
lint-and-build: | |
name: Lint and Test Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# Make sure the actual branch is checked out when running on pull requests | |
ref: ${{ github.head_ref }} | |
# This is important to fetch the changes to the previous commit | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Build | |
run: npm run build | |
prettify: | |
name: Prettify Code | |
needs: lint-and-build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
# Make sure the actual branch is checked out when running on pull requests | |
ref: ${{ github.head_ref }} | |
# This is important to fetch the changes to the previous commit | |
fetch-depth: 0 | |
- name: Prettify code | |
uses: creyD/[email protected] | |
with: | |
prettier_options: --write **/*.{js,ts,vue,md} | |
only_changed: True |