Update README.md #7
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: CI/CD | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
# Path Filtering | |
filter-paths: | |
name: Filter Paths | |
runs-on: ubuntu-latest | |
outputs: | |
functions: ${{ steps.filter.outputs.functions }} | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Filter Paths | |
id: filter | |
uses: dorny/paths-filter@v3.0.2 | |
with: | |
filters: | | |
functions: | |
- 'functions/**' | |
- '!(functions)/**/*.md' | |
# START: Cloud Functions | |
func-lint-typecheck: | |
name: 'Functions: Lint & Type Check' | |
runs-on: ubuntu-latest | |
needs: filter-paths | |
if: needs.filter-paths.outputs.functions == 'true' | |
permissions: | |
checks: write | |
pull-requests: read | |
contents: read | |
defaults: | |
run: | |
working-directory: functions | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Nodejs Environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: yarn | |
cache-dependency-path: 'functions/yarn.lock' | |
- name: Install Dependencies | |
run: yarn --frozen-lockfile | |
- name: Lint | |
run: yarn lint --output-file eslint_report.json --format json | |
continue-on-error: true | |
- name: Type Check | |
run: yarn tsc --noEmit > typescript.log | |
continue-on-error: true | |
- name: Annotate Code | |
uses: DerLev/eslint-annotations@v2 | |
with: | |
eslint-report: functions/eslint_report.json | |
typescript-log: functions/typescript.log | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
error-on-warn: true | |
status-check-name: 'Functions: Annotations' | |
fail-in-pr: false | |
add-notice-with-url: false | |
# END: Cloud Functions |