Skip to content

Commit

Permalink
Merge branch 'sweepai:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
henri-edh authored Aug 10, 2024
2 parents 8b7a5e5 + 74bbd41 commit 2eb838b
Show file tree
Hide file tree
Showing 412 changed files with 63,963 additions and 53,028 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
contact_links:
- name: Discord
url: https://discord.gg/sweep
- name: Discourse
url: https://community.sweep.dev/
about: Feel free to report bugs and request features here!
- name: Docs
url: https://docs.sweep.dev
Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ Please provide a detailed list of the changes made in this pull request.
# Additional Notes

Please provide any additional notes or screenshots here.
When you make a PR, please ping us on Discord at http://discord.gg/sweep.
When you make a PR, please ping us on Discourse at https://community.sweep.dev/.
107 changes: 70 additions & 37 deletions .github/workflows/cypress.yml
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
52 changes: 0 additions & 52 deletions .github/workflows/install-script.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/jest.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/npm-publish.yml.removed

This file was deleted.

42 changes: 0 additions & 42 deletions .github/workflows/platform-build.yml

This file was deleted.

Loading

0 comments on commit 2eb838b

Please sign in to comment.