-
Notifications
You must be signed in to change notification settings - Fork 2
Enable Linter to CI #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d051100
Test CI
richardhjtan c69c2b2
Test catalog files fetch
richardhjtan e871358
Test catalog files fetc
richardhjtan a2e388c
Test catalog files fetch
richardhjtan dbfca47
Test catalog files fetch
richardhjtan c7b8a34
Test catalog files fetch
richardhjtan 35833b9
Test host lint
richardhjtan df8926e
Not to override tsconfig
richardhjtan 9392358
Build boxel icons and ui before lint
richardhjtan 1ef553b
Build boxel icons and ui before lint
richardhjtan 9ac6c93
use build-common-deps from root package
richardhjtan 8acf2ad
Add upload image command
richardhjtan ced21e6
Merge pull request #16 from cardstack/add-upload-image-command
richardhjtan 6f165bd
Clean up lint workflow
richardhjtan 73a9e99
Update catalog file
richardhjtan b547dc1
Merge pull request #18 from cardstack/update-catalog-file
richardhjtan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: CI Lint | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| checks: write | ||
| contents: read | ||
| id-token: write | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint | ||
| runs-on: ubuntu-latest | ||
| concurrency: | ||
| group: lint-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
| steps: | ||
| # Checkout the boxel monorepo at root to get tooling and init action | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 | ||
| with: | ||
| repository: cardstack/boxel | ||
|
|
||
| # Checkout this catalog repo into a temp location | ||
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2 | ||
richardhjtan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| with: | ||
| path: boxel-catalog-src | ||
|
|
||
| # Copy catalog files into the monorepo's catalog-realm location | ||
| - name: Copy catalog files into monorepo | ||
| run: | | ||
| # TODO: Simplify this step once catalog-realm content is fully migrated out of the monorepo | ||
| # Remove all files except config files we want to keep | ||
| cd packages/catalog-realm | ||
| find . -mindepth 1 \ | ||
| ! -name '.gitignore' \ | ||
| ! -name 'tsconfig.json' \ | ||
| ! -name 'package.json' \ | ||
| ! -name '.realm.json' \ | ||
| ! -name '.' \ | ||
| -exec rm -rf {} + 2>/dev/null || true | ||
| cd ../.. | ||
|
|
||
| # Copy catalog files | ||
| cp -r boxel-catalog-src/* packages/catalog-realm/ | ||
|
|
||
| - uses: ./.github/actions/init | ||
|
|
||
| # Boxel UI and Boxel Icons need to be built first so that their | ||
| # linting outputs types are available for projects that depend on them | ||
| - name: Build common dependencies | ||
| if: always() | ||
| run: pnpm run build-common-deps | ||
|
|
||
| - name: Lint Catalog | ||
| if: always() | ||
| run: pnpm run lint | ||
| working-directory: packages/catalog-realm | ||
|
|
||
| - name: Lint Host | ||
| if: always() | ||
| run: pnpm run lint | ||
| working-directory: packages/host | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import ImageCard from 'https://cardstack.com/base/image'; | ||
| import { contains, field } from 'https://cardstack.com/base/card-api'; | ||
| import StringField from 'https://cardstack.com/base/string'; | ||
| import UrlField from 'https://cardstack.com/base/url'; | ||
|
|
||
| export const CLOUDFLARE_ACCOUNT_ID = '4a94a1eb2d21bbbe160234438a49f687'; | ||
richardhjtan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| const CLOUDFLARE_VARIANT = 'public'; | ||
|
|
||
| export class CloudflareImage extends ImageCard { | ||
| static displayName = 'Cloudflare Image'; | ||
|
|
||
| @field cloudflareId = contains(StringField); | ||
| @field url = contains(UrlField, { | ||
| computeVia(this: CloudflareImage) { | ||
| if (!this.cloudflareId) { | ||
| return undefined; | ||
| } | ||
| return `https://i.boxel.site/${this.cloudflareId}/${CLOUDFLARE_VARIANT}`; | ||
| }, | ||
| }); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.