diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 5f5c411..d6b46a7 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -22,15 +22,16 @@ jobs: - name: Install dependencies run: sudo apt update && sudo apt install libgomp1 - - name: Cache circuits - id: cache-circuits - uses: actions/cache@v4 + - name: Restore cached circuits + id: restore-circuits + uses: actions/cache/restore@v4 with: - path: datadir/circuits + path: | + datadir/circuits key: ${{ env.circuit_version }}-circuits - name: Download circuits - if: steps.cache-circuits.outputs.cache-hit != 'true' + if: steps.restore-circuits.outputs.cache-hit != 'true' run: | platform=${RUNNER_OS,,} architecture=$([[ $RUNNER_ARCH == 'X64' ]] && echo amd64 || echo ${RUNNER_ARCH,,}) @@ -44,15 +45,22 @@ jobs: chmod +x cirdl-${circuit_version}-${platform}-${architecture} ./cirdl-${circuit_version}-${platform}-${architecture} ./datadir/circuits ${eth_provider} ${marketplace_address} - - name: Cache codex - id: cache-codex + - name: Cache circuits + id: cache-circuits uses: actions/cache@v4 + with: + path: datadir/circuits + key: ${{ env.circuit_version }}-circuits + + - name: Restore cached codex + id: restore-codex + uses: actions/cache/restore@v4 with: path: codex-${{ env.codex_version }}-${{ env.RUNNER_OS }}-${{ env.RUNNER_ARCH }} key: ${{ env.codex_version }}-codex - name: Download codex - if: steps.cache-codex.outputs.cache-hit != 'true' + if: steps.restore-codex.outputs.cache-hit != 'true' run: | platform=${RUNNER_OS,,} architecture=$([[ $RUNNER_ARCH == 'X64' ]] && echo amd64 || echo ${RUNNER_ARCH,,}) @@ -62,6 +70,13 @@ jobs: [[ $? -eq 0 ]] && { echo "Checksum is OK"; } || { echo "Checksum failed"; exit 1; } tar -zxvf codex-${codex_version}-${platform}-${architecture}.tar.gz + - name: Cache codex + id: cache-codex + uses: actions/cache@v4 + with: + path: codex-${{ env.codex_version }}-${{ env.RUNNER_OS }}-${{ env.RUNNER_ARCH }} + key: ${{ env.codex_version }}-codex + - name: Run Codex node run: | # Get an eth address diff --git a/package.json b/package.json index 6b12d23..a72c073 100644 --- a/package.json +++ b/package.json @@ -8,13 +8,13 @@ "version": "0.0.3", "type": "module", "scripts": { - "dev": "vite", + "dev": "vite --host 127.0.0.1 --port 5173", "compile": "tsc --noEmit", "build": "tsc -b && vite build", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", "format": "prettier --write ./src", - "test": "npx playwright test --ui" + "test": "npx playwright test" }, "keywords": [ "Codex", @@ -62,4 +62,4 @@ "author": "Codex team", "readme": "README.md", "license": "MIT" -} +} \ No newline at end of file diff --git a/playwright.config.ts b/playwright.config.ts index b12ccf7..97af063 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -30,7 +30,7 @@ export default defineConfig({ /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */ use: { /* Base URL to use in actions like `await page.goto('/')`. */ - baseURL: 'http://127.0.0.1:5174', + baseURL: 'http://127.0.0.1:5173', /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */ trace: 'on-first-retry', @@ -77,7 +77,7 @@ export default defineConfig({ /* Run your local dev server before starting the tests */ webServer: { command: 'npm run dev', - url: 'http://127.0.0.1:5174', + url: 'http://127.0.0.1:5173', reuseExistingServer: !process.env.CI, }, });