-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #265 from 0x4007/chore/sync-card-branch-to-template
- Loading branch information
Showing
33 changed files
with
1,912 additions
and
903 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { KnipConfig } from "knip"; | ||
|
||
const config: KnipConfig = { | ||
entry: ["build/esbuild-build.ts", "static/scripts/rewards/init.ts"], | ||
project: ["src/**/*.ts", "static/scripts/**/*.ts"], | ||
ignore: ["src/types/config.ts", "**/__mocks__/**", "**/__fixtures__/**", "lib/**/*"], | ||
ignoreExportsUsedInFile: true, | ||
// eslint can also be safely ignored as per the docs: https://knip.dev/guides/handling-issues#eslint--jest | ||
ignoreDependencies: ["eslint-config-prettier", "eslint-plugin-prettier"], | ||
eslint: true, | ||
ignoreBinaries: ["forge"], | ||
}; | ||
|
||
export default config; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Knip-reporter | ||
|
||
on: | ||
workflow_run: | ||
workflows: ["Knip"] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
knip-reporter: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion != 'success' }} | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: knip-results | ||
run-id: ${{ github.event.workflow_run.id }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Read pr number | ||
id: pr-number | ||
uses: juliangruber/read-file-action@v1 | ||
with: | ||
path: ./pr-number.txt | ||
trim: true | ||
|
||
- name: Report knip results to pull request | ||
uses: gitcoindev/knip-reporter@main | ||
with: | ||
verbose: true | ||
comment_id: ${{ github.workflow }}-reporter | ||
command_script_name: knip-ci | ||
annotations: true | ||
ignore_results: false | ||
json_input: true | ||
json_input_file_name: knip-results.json | ||
pull_request_number: ${{ steps.pr-number.outputs.content }} | ||
token: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Knip | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
run-knip: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# needed to use yarn v4 | ||
- name: Enable corepack | ||
run: corepack enable | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.10.0 | ||
|
||
- name: Install toolchain | ||
run: yarn install | ||
|
||
- name: Store PR number | ||
run: echo ${{ github.event.number }} > pr-number.txt | ||
|
||
- name: Run Knip | ||
run: yarn knip || yarn knip --reporter json > knip-results.json | ||
|
||
- name: Upload knip result | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: knip-results | ||
path: | | ||
knip-results.json | ||
pr-number.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: release-please | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
jobs: | ||
release-please: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: google-github-actions/release-please-action@v3 | ||
with: | ||
release-type: node | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.10.0" | ||
registry-url: https://registry.npmjs.org/ | ||
- run: | | ||
yarn install --immutable --immutable-cache --check-cache |
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
describe("Homepage tests", () => { | ||
it("Console is cleared of errors and warnings", () => { | ||
cy.visit("/", { | ||
onBeforeLoad(win) { | ||
cy.stub(win.console, "error").as("consoleError"); | ||
}, | ||
}); | ||
cy.get("@consoleError").should("not.be.called"); | ||
cy.get("body").should("exist"); | ||
cy.get("h1").should("exist"); | ||
}); | ||
}); |
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
Oops, something went wrong.