From ae6336983fbf70b73f3c1bb098abf3ae3e8d62fd Mon Sep 17 00:00:00 2001 From: Jai A Date: Wed, 3 Jul 2024 20:00:19 -0700 Subject: [PATCH] Add GH actions --- .github/workflows/ci.yml | 45 +- Cargo.lock | 18 - apps/knossos/src/components/ui/Avatar.vue | 7 +- .../knossos/src/components/ui/Breadcrumbs.vue | 5 +- apps/knossos/src/components/ui/Checkbox.vue | 15 +- .../components/ui/CollectionCreateModal.vue | 18 +- .../src/components/ui/ConditionalNuxtLink.vue | 5 +- apps/knossos/src/components/ui/CopyCode.vue | 7 +- .../components/ui/EnvironmentIndicator.vue | 13 +- apps/knossos/src/components/ui/FileInput.vue | 2 +- .../src/components/ui/MessageBanner.vue | 6 +- apps/knossos/src/components/ui/Modal.vue | 15 +- .../src/components/ui/ModalConfirm.vue | 29 +- .../src/components/ui/ModalCreation.vue | 33 +- .../src/components/ui/ModerationChecklist.vue | 163 ++---- .../src/components/ui/NavStackItem.vue | 21 +- .../src/components/ui/NotificationItem.vue | 193 ++----- .../src/components/ui/Notifications.vue | 15 +- .../components/ui/OrganizationCreateModal.vue | 24 +- .../ui/OrganizationProjectTransferModal.vue | 38 +- apps/knossos/src/components/ui/Pagination.vue | 10 +- .../knossos/src/components/ui/ProjectCard.vue | 53 +- .../src/components/ui/ProjectMemberHeader.vue | 32 +- .../components/ui/VersionFilterControl.vue | 2 +- .../src/components/ui/charts/Chart.client.vue | 8 +- .../src/components/ui/charts/ChartDisplay.vue | 48 +- .../ui/charts/CompactChart.client.vue | 8 +- .../src/components/ui/report/ReportInfo.vue | 90 +-- .../src/components/ui/report/ReportView.vue | 7 +- .../src/components/ui/report/ReportsList.vue | 10 +- .../src/components/ui/search/SearchFilter.vue | 12 +- .../ui/thread/ConversationThread.vue | 73 +-- .../components/ui/thread/ThreadMessage.vue | 24 +- .../components/ui/thread/ThreadSummary.vue | 20 +- apps/knossos/src/error.vue | 9 +- apps/knossos/src/layouts/default.vue | 319 +++-------- apps/knossos/src/pages/[type]/[id].vue | 378 ++++-------- .../src/pages/[type]/[id]/changelog.vue | 8 +- .../knossos/src/pages/[type]/[id]/gallery.vue | 70 +-- .../src/pages/[type]/[id]/moderation.vue | 22 +- .../pages/[type]/[id]/settings/analytics.vue | 3 +- .../[type]/[id]/settings/description.vue | 6 +- .../src/pages/[type]/[id]/settings/index.vue | 27 +- .../pages/[type]/[id]/settings/license.vue | 20 +- .../src/pages/[type]/[id]/settings/links.vue | 15 +- .../pages/[type]/[id]/settings/members.vue | 166 ++---- .../src/pages/[type]/[id]/settings/tags.vue | 10 +- .../pages/[type]/[id]/version/[version].vue | 201 ++----- .../src/pages/[type]/[id]/versions.vue | 39 +- apps/knossos/src/pages/app.vue | 538 ++++-------------- apps/knossos/src/pages/auth/authorize.vue | 55 +- .../knossos/src/pages/auth/reset-password.vue | 32 +- apps/knossos/src/pages/auth/sign-in.vue | 61 +- apps/knossos/src/pages/auth/sign-up.vue | 73 +-- apps/knossos/src/pages/auth/verify-email.vue | 29 +- apps/knossos/src/pages/auth/welcome.vue | 15 +- apps/knossos/src/pages/collection/[id].vue | 115 +--- apps/knossos/src/pages/dashboard.vue | 37 +- .../knossos/src/pages/dashboard/analytics.vue | 5 +- .../src/pages/dashboard/collections.vue | 32 +- apps/knossos/src/pages/dashboard/index.vue | 63 +- .../src/pages/dashboard/notifications.vue | 35 +- .../src/pages/dashboard/organizations.vue | 22 +- apps/knossos/src/pages/dashboard/projects.vue | 49 +- .../src/pages/dashboard/revenue/index.vue | 53 +- .../src/pages/dashboard/revenue/transfers.vue | 57 +- .../src/pages/dashboard/revenue/withdraw.vue | 79 +-- apps/knossos/src/pages/flags.vue | 5 +- apps/knossos/src/pages/frog.vue | 5 +- apps/knossos/src/pages/index.vue | 204 ++----- apps/knossos/src/pages/legal.vue | 45 +- apps/knossos/src/pages/legal/ccpa.vue | 17 +- apps/knossos/src/pages/legal/cmp.vue | 16 +- apps/knossos/src/pages/legal/copyright.vue | 8 +- apps/knossos/src/pages/legal/privacy.vue | 29 +- apps/knossos/src/pages/legal/rules.vue | 40 +- apps/knossos/src/pages/legal/security.vue | 5 +- apps/knossos/src/pages/legal/terms.vue | 28 +- apps/knossos/src/pages/moderation.vue | 15 +- apps/knossos/src/pages/moderation/index.vue | 16 +- apps/knossos/src/pages/moderation/reports.vue | 5 +- apps/knossos/src/pages/moderation/review.vue | 65 +-- apps/knossos/src/pages/organization/[id].vue | 119 +--- .../organization/[id]/settings/index.vue | 19 +- .../organization/[id]/settings/members.vue | 46 +- .../organization/[id]/settings/projects.vue | 75 +-- apps/knossos/src/pages/report.vue | 28 +- .../src/pages/search/[searchProjectType].vue | 61 +- apps/knossos/src/pages/settings/account.vue | 156 ++--- .../src/pages/settings/applications.vue | 79 +-- .../src/pages/settings/authorizations.vue | 19 +- apps/knossos/src/pages/settings/index.vue | 51 +- apps/knossos/src/pages/settings/language.vue | 47 +- apps/knossos/src/pages/settings/pats.vue | 35 +- apps/knossos/src/pages/settings/profile.vue | 39 +- apps/knossos/src/pages/settings/sessions.vue | 16 +- apps/knossos/src/pages/user/[id].vue | 123 +--- apps/theseus_gui_rs/Cargo.toml | 2 +- apps/theseus_gui_rs/tauri.conf.json | 5 +- 99 files changed, 1250 insertions(+), 3885 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 34fd7054b..9e5752ef3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,17 +1,12 @@ name: CI - on: push: branches: - - main + - master pull_request: -permissions: - actions: read - contents: read - jobs: - main: + master: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -20,21 +15,31 @@ jobs: - uses: pnpm/action-setup@v2 with: - version: 8 + version: 9 - # Connect your workspace on nx.app and uncomment this to enable task distribution. - # The "--stop-agents-after" is optional, but allows idle agents to shut down once the "build" targets have been requested - # - run: pnpm dlx nx-cloud start-ci-run --distribute-on="5 linux-medium-js" --stop-agents-after="build" - - # Cache node_modules - - uses: actions/setup-node@v3 + - name: Restore cached npm dependencies + id: cache-dependencies-restore + uses: actions/cache/restore@v3 with: - node-version: 20 - cache: 'pnpm' + path: | + node_modules + key: npm-dependencies-${{ hashFiles('pnpm-lock.yaml') }} - run: pnpm install --frozen-lockfile - - uses: nrwl/nx-set-shas@v4 - # Prepend any command with "nx-cloud record --" to record its logs to Nx Cloud - # - run: pnpm exec nx-cloud record -- echo Hello World - - run: pnpm exec nx affected -t lint test build + - name: Cache npm dependencies + id: cache-dependencies-save + uses: actions/cache/save@v3 + with: + path: | + node_modules + key: ${{ steps.cache-dependencies-restore.outputs.cache-primary-key }} + + - uses: nrwl/nx-set-shas@v3 + + # This line is needed for nx affected to work when CI is running on a PR + - run: git branch --track master origin/master + if: ${{ github.event_name == 'pull_request' }} + + - run: pnpm nx affected -t lint test build --parallel=3 + - run: pnpm nx affected -t e2e --parallel=1 diff --git a/Cargo.lock b/Cargo.lock index 27c06604b..803721e16 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -518,9 +518,6 @@ name = "bytes" version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" -dependencies = [ - "serde", -] [[package]] name = "bzip2" @@ -2788,12 +2785,6 @@ dependencies = [ "uuid 1.9.1", ] -[[package]] -name = "minisign-verify" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "933dca44d65cdd53b355d0b73d380a2ff5da71f87f036053188bf1eab6a19881" - [[package]] name = "miniz_oxide" version = "0.7.4" @@ -3874,12 +3865,10 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tokio-util", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", "winreg 0.50.0", ] @@ -4888,8 +4877,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "336bc661a3f3250853fa83c6e5245449ed1c26dce5dcb28bdee7efedf6278806" dependencies = [ "anyhow", - "base64 0.21.7", - "bytes", "cocoa 0.24.1", "dirs-next", "dunce", @@ -4904,8 +4891,6 @@ dependencies = [ "heck 0.5.0", "http 0.2.12", "ignore", - "indexmap 1.9.3", - "minisign-verify", "objc", "once_cell", "open", @@ -4914,7 +4899,6 @@ dependencies = [ "rand 0.8.5", "raw-window-handle", "regex", - "reqwest 0.11.27", "rfd", "semver", "serde", @@ -4930,14 +4914,12 @@ dependencies = [ "tauri-utils", "tempfile", "thiserror", - "time", "tokio", "url", "uuid 1.9.1", "webkit2gtk", "webview2-com", "windows 0.39.0", - "zip", ] [[package]] diff --git a/apps/knossos/src/components/ui/Avatar.vue b/apps/knossos/src/components/ui/Avatar.vue index 5f23b3d28..05f6ad515 100644 --- a/apps/knossos/src/components/ui/Avatar.vue +++ b/apps/knossos/src/components/ui/Avatar.vue @@ -9,7 +9,7 @@ :alt="alt" :loading="loading" @load="updatePixelated" - > + /> diff --git a/apps/knossos/src/components/ui/CollectionCreateModal.vue b/apps/knossos/src/components/ui/CollectionCreateModal.vue index 41bce01c9..acd464afc 100644 --- a/apps/knossos/src/components/ui/CollectionCreateModal.vue +++ b/apps/knossos/src/components/ui/CollectionCreateModal.vue @@ -1,8 +1,5 @@