Browse Source

Don't install the CLI

Jonathan Kelley 1 year ago
parent
commit
0ceaaa6c96
2 changed files with 8 additions and 7 deletions
  1. 6 5
      .github/workflows/playwright.yml
  2. 2 2
      playwright-tests/playwright.config.js

+ 6 - 5
.github/workflows/playwright.yml

@@ -33,11 +33,12 @@ jobs:
       run: npm install -D @playwright/test
     - name: Install Playwright Browsers
       run: npx playwright install --with-deps
-    - name: Install Dioxus CLI
-      uses: actions-rs/cargo@v1
-      with:
-        command: install
-        args: --path packages/cli
+    #  Cache the CLI by using cargo run internally
+    # - name: Install Dioxus CLI
+    #   uses: actions-rs/cargo@v1
+    #   with:
+    #     command: install
+    #     args: --path packages/cli
     - name: Run Playwright tests
       run: npx playwright test
     - uses: actions/upload-artifact@v3

+ 2 - 2
playwright-tests/playwright.config.js

@@ -82,7 +82,7 @@ module.exports = defineConfig({
     },
     {
       cwd: path.join(process.cwd(), "playwright-tests", "web"),
-      command: "dx serve",
+      command: "cargo run --package dioxus-cli -- serve",
       port: 8080,
       timeout: 10 * 60 * 1000,
       reuseExistingServer: !process.env.CI,
@@ -90,7 +90,7 @@ module.exports = defineConfig({
     },
     {
       cwd: path.join(process.cwd(), 'playwrite-tests', 'fullstack'),
-      command: 'dx build --features web --release\ncargo run --release --features ssr',
+      command: 'cargo run --package dioxus-cli -- build --features web --release\ncargo run --release --features ssr',
       port: 3333,
       timeout: 10 * 60 * 1000,
       reuseExistingServer: !process.env.CI,