chore: update copyrights. happy cinco de mayo! #18
This file contains hidden or 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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - .github/** | |
| - .gitignore | |
| - .vscode/** | |
| - .** | |
| - LICENSE | |
| - "**/*.md" | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| run-deno-lint: | |
| description: "Run deno lint?" | |
| required: false | |
| default: true | |
| type: boolean | |
| run-deno-fmt: | |
| description: "Run deno fmt --check?" | |
| required: false | |
| default: true | |
| type: boolean | |
| run-deno-test: | |
| description: "Run deno test?" | |
| required: false | |
| default: true | |
| type: boolean | |
| run-doc-lint: | |
| description: "Run deno doc --lint?" | |
| required: false | |
| default: true | |
| type: boolean | |
| run-doc-test: | |
| description: "Run deno test --doc?" | |
| required: false | |
| default: true | |
| type: boolean | |
| run-deno-coverage: | |
| description: "Run deno coverage?" | |
| required: false | |
| default: false | |
| type: boolean | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - name: setup deno | |
| uses: denoland/setup-deno@main | |
| with: | |
| deno-version: canary | |
| - id: lint | |
| if: | | |
| github.event_name != 'workflow_dispatch' || | |
| github.event.inputs.run-deno-lint == 'true' | |
| name: lint | |
| run: | | |
| deno lint | |
| __license_check_output=$(deno task check:licenses 2>&1) | |
| __license_check_status=$? | |
| if [ $__license_check_status -ne 0 ]; then | |
| echo "::error::License header check failed" | |
| echo "$__license_check_output" | |
| echo "::warning::Please run 'deno task fix:licenses' to fix the license headers in the files, then commit and push the changes to run this workflow again." | |
| exit 1 | |
| fi | |
| - id: fmt | |
| if: | | |
| github.event_name != 'workflow_dispatch' || | |
| github.event.inputs.run-deno-fmt == 'true' | |
| name: fmt | |
| run: deno fmt --check | |
| - id: test | |
| if: | | |
| github.event_name != 'workflow_dispatch' || | |
| github.event.inputs.run-deno-test == 'true' | |
| continue-on-error: true | |
| name: test | |
| run: deno task test | |
| # Only run doc test if the workflow is triggered manually and | |
| # the doc-test input is set to true. this is temporary until | |
| # all the doc test issues are fixed. | |
| - id: doc-test | |
| continue-on-error: true | |
| if: | | |
| github.event_name == 'workflow_dispatch' && | |
| github.event.inputs.run-doc-test == 'true' | |
| name: deno test --doc | |
| run: deno task test:doc | |
| - id: coverage | |
| if: | | |
| ( | |
| steps.test.conclusion == 'success' || | |
| steps.doc-test.conclusion == 'success' | |
| ) && ( | |
| ( | |
| github.event_name == 'workflow_dispatch' && | |
| github.event.inputs.run-deno-coverage == 'true' | |
| ) || ( | |
| github.event_name == 'push' && github.ref_name == 'main' | |
| ) | |
| ) | |
| name: coverage | |
| run: | | |
| deno coverage --detailed .coverage | |
| deno coverage --lcov --output=lcov.info .coverage | |
| echo -e "\e[92m✔︎ LCOV report generated at $(pwd)/lcov.info\e[0m" | |
| deno coverage --html .coverage | |
| mv .coverage/html lcov_html | |
| echo -e "\e[92m✔︎ HTML report generated at $(pwd)/lcov_html/index.html\e[0m" | |
| - id: artifacts | |
| if: | | |
| steps.coverage.outcome == 'success' && ( | |
| ( | |
| github.event_name == 'workflow_dispatch' && | |
| github.event.inputs.run-deno-coverage == 'true' | |
| ) || ( | |
| github.event_name != 'workflow_dispatch' && | |
| startsWith(github.ref, 'refs/tags/') | |
| ) | |
| ) | |
| name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report | |
| path: | | |
| lcov_html | |
| lcov.info | |
| .coverage | |
| retention-days: 14 | |
| # Only run doc lint if the workflow is triggered manually and | |
| # the doc-lint input is set to true. this is temporary until | |
| # all the doc lint issues are fixed. | |
| - id: doc-lint | |
| if: | | |
| github.event_name == 'workflow_dispatch' && | |
| github.event.inputs.run-doc-lint == 'true' | |
| name: deno doc | |
| run: deno task lint:doc |