forked from sweepai/sweep
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'sweepai:main' into main
- Loading branch information
Showing
412 changed files
with
63,963 additions
and
53,028 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 |
---|---|---|
@@ -1,47 +1,80 @@ | ||
name: Cypress Tests | ||
name: Cypress E2E Tests | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
schedule: | ||
- cron: '*/30 * * * *' # Runs every 30 minutes | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
paths: | ||
- 'platform/**' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'platform/**' | ||
|
||
- '.github/**' | ||
- 'sweepai/**' | ||
- 'sweep_chat/**' | ||
- pyproject.toml | ||
- requirements.txt | ||
|
||
jobs: | ||
e2e: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
browser: [chrome] | ||
node: [18, 20, 21] | ||
cypress: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
- name: Write to .env | ||
run: echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}\NEXT_PUBLIC_NO_TELEMETRY=true\nNEXT_PUBLIC_DEFAULT_REPO_PATH=$(pwd)\n" >> platform/.env | ||
- name: Cypress run | ||
if: ${{ !(matrix.os == 'ubuntu-latest' && matrix.browser == 'safari') }} | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
build: pnpm run build | ||
start: pnpm start | ||
browser: ${{ matrix.browser }} | ||
wait-on: 'http://localhost:4000' # Waits for above | ||
record: true | ||
working-directory: platform | ||
env: | ||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache node modules | ||
id: cache-node-modules | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: | | ||
~/.npm | ||
~/.cache/Cypress | ||
sweep_chat/node_modules | ||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install npm dependencies | ||
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }} | ||
working-directory: sweep_chat | ||
run: npm ci | ||
|
||
- name: Cache save node modules | ||
if: ${{ steps.cache-node-modules.outputs.cache-hit != 'true' }} | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: | | ||
~/.npm | ||
~/.cache/Cypress | ||
sweep_chat/node_modules | ||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Cache build | ||
id: cache-build | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: sweep_chat/.next | ||
key: ${{ runner.os }}-${{ hashFiles('sweep_chat/components/*.tsx', 'sweep_chat/app/*.tsx', 'sweep_chat/app/*.ts', 'sweep_chat/lib/*.ts') }} | ||
|
||
- name: Build next.js | ||
if: ${{ steps.cache-build.outputs.cache-hit != 'true' }} | ||
working-directory: sweep_chat | ||
run: | | ||
export BACKEND_URL=${{ secrets.BACKEND_URL }} | ||
npm run build | ||
- name: Cache build | ||
if: ${{ steps.cache-build.outputs.cache-hit != 'true' }} | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: sweep_chat/.next | ||
key: ${{ runner.os }}-${{ hashFiles('sweep_chat/components/*.tsx', 'sweep_chat/app/*.tsx', 'sweep_chat/app/*.ts', 'sweep_chat/lib/*.ts') }} | ||
|
||
- name: Run Cypress tests | ||
working-directory: sweep_chat | ||
run: | | ||
echo "${{ secrets.CYPRESS_ENV_LOCAL }}" > .env.local | ||
echo "\nBACKEND_URL=${{ secrets.BACKEND_URL }}" >> env.local | ||
export CYPRESS_LOGIN_SESSION_COOKIE=${{ secrets.CYPRESS_LOGIN_SESSION_COOKIE }} | ||
npm run e2e:ci |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.