Skip to content

Docs: Update CONTRIBUTING (#2864) #1145

Docs: Update CONTRIBUTING (#2864)

Docs: Update CONTRIBUTING (#2864) #1145

---
name: Passport
on:
push:
branches:
- main
defaults:
run:
working-directory: ./apps
jobs:
build-publish-test-passport-dev:
runs-on: ubuntu-latest
environment: dev
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
- run: nix-build apps.nix
- name: Cache Dependencies
id: cache-modules
uses: actions/cache@v3
with:
path: |
node_modules
.yarn
key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }}
- name: Install Dependencies
run: yarn install
- name: Test
run: yarn workspaces foreach -i -v -t --include passport run test
- name: Deploy to Dev Worker
uses: cloudflare/[email protected]
with:
wranglerVersion: '3.19.0'
apiToken: ${{ secrets.TOKEN_CLOUDFLARE_API }}
accountId: ${{ secrets.INTERNAL_CLOUDFLARE_ACCOUNT_ID }}
workingDirectory: 'apps/passport'
command: publish --config wrangler.dev.toml --env dev
environment: 'dev'
secrets: |
SECRET_SESSION_KEY
SECRET_SESSION_SALT
SECRET_WEBAUTHN_SIGNING_KEY
APIKEY_ALCHEMY_PUBLIC
INTERNAL_GOOGLE_OAUTH_CLIENT_ID
SECRET_GOOGLE_OAUTH_CLIENT_SECRET
INTERNAL_GITHUB_OAUTH_CLIENT_ID
SECRET_GITHUB_OAUTH_CLIENT_SECRET
INTERNAL_TWITTER_OAUTH_CLIENT_ID
SECRET_TWITTER_OAUTH_CLIENT_SECRET
INTERNAL_MICROSOFT_OAUTH_CLIENT_ID
SECRET_MICROSOFT_OAUTH_CLIENT_SECRET
INTERNAL_APPLE_OAUTH_CLIENT_ID
SECRET_APPLE_OAUTH_CLIENT_SECRET
INTERNAL_DISCORD_OAUTH_CLIENT_ID
SECRET_DISCORD_OAUTH_CLIENT_SECRET
env:
NODE_ENV: 'development'
SECRET_SESSION_KEY: ${{ secrets.SECRET_SESSION_KEY_DEV }}
SECRET_SESSION_SALT: ${{ secrets.SECRET_SESSION_SALT_DEV }}
SECRET_WEBAUTHN_SIGNING_KEY: ${{ secrets.SECRET_WEBAUTHN_SIGNING_KEY_DEV }}
APIKEY_ALCHEMY_PUBLIC: ${{ secrets.APIKEY_ALCHEMY_PUBLIC_GOERLI }}
INTERNAL_GOOGLE_OAUTH_CLIENT_ID: ${{ vars.INTERNAL_GOOGLE_OAUTH_CLIENT_ID_DEV }}
SECRET_GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.SECRET_GOOGLE_OAUTH_CLIENT_SECRET_DEV }}
INTERNAL_GITHUB_OAUTH_CLIENT_ID: ${{ vars.INTERNAL_GITHUB_OAUTH_CLIENT_ID_DEV }}
SECRET_GITHUB_OAUTH_CLIENT_SECRET: ${{ secrets.SECRET_GITHUB_OAUTH_CLIENT_SECRET_DEV }}
INTERNAL_TWITTER_OAUTH_CLIENT_ID: ${{ vars.INTERNAL_TWITTER_OAUTH_CLIENT_ID_DEV }}
SECRET_TWITTER_OAUTH_CLIENT_SECRET: ${{ secrets.SECRET_TWITTER_OAUTH_CLIENT_SECRET_DEV }}
INTERNAL_MICROSOFT_OAUTH_CLIENT_ID: ${{ vars.INTERNAL_MICROSOFT_OAUTH_CLIENT_ID_DEV }}
SECRET_MICROSOFT_OAUTH_CLIENT_SECRET: ${{ secrets.SECRET_MICROSOFT_OAUTH_CLIENT_SECRET_DEV }}
INTERNAL_APPLE_OAUTH_CLIENT_ID: ${{ vars.INTERNAL_APPLE_OAUTH_CLIENT_ID_DEV }}
SECRET_APPLE_OAUTH_CLIENT_SECRET: ${{ secrets.SECRET_APPLE_OAUTH_CLIENT_SECRET_DEV }}
INTERNAL_DISCORD_OAUTH_CLIENT_ID: ${{ vars.INTERNAL_DISCORD_OAUTH_CLIENT_ID_DEV }}
SECRET_DISCORD_OAUTH_CLIENT_SECRET: ${{ secrets.SECRET_DISCORD_OAUTH_CLIENT_SECRET_DEV }}
- name: Setup Playwright
run: yarn playwright install --with-deps
working-directory: 'apps/passport'
- name: Run Playwright tests
run: yarn playwright test
working-directory: 'apps/passport'
env:
INTERNAL_PLAYWRIGHT_BASE_URL: https://passport-dev.rollup.id
INTERNAL_PLAYWRIGHT_TEST_URL: ${{ secrets.INTERNAL_PLAYWRIGHT_TEST_URL }}
INTERNAL_EMAIL_TEST_USERNAME: ${{ secrets.INTERNAL_EMAIL_TEST_USERNAME}}
SECRET_TEST_API_TOKEN: ${{ secrets.SECRET_TEST_API_TEST_TOKEN }}
INTERNAL_TWITTER_TEST_USERNAME: ${{ secrets.INTERNAL_TWITTER_TEST_USERNAME }}
SECRET_TWITTER_TEST_USER_PASSWORD: ${{ secrets.SECRET_TWITTER_TEST_USER_PASSWORD }}
INTERNAL_GOOGLE_TEST_USERNAME: ${{ secrets.INTERNAL_GOOGLE_TEST_USERNAME }}
SECRET_GOOGLE_TEST_USER_PASSWORD: ${{ secrets.SECRET_GOOGLE_TEST_USER_PASSWORD }}
INTERNAL_APPLE_TEST_USERNAME: ${{ secrets.INTERNAL_APPLE_TEST_USERNAME }}
SECRET_APPLE_TEST_USER_PASSWORD: ${{ secrets.SECRET_APPLE_TEST_USER_PASSWORD }}
INTERNAL_DISCORD_TEST_USERNAME: ${{ secrets.INTERNAL_DISCORD_TEST_USERNAME }}
SECRET_DISCORD_TEST_USER_PASSWORD: ${{ secrets.SECRET_DISCORD_TEST_USER_PASSWORD }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: passport/playwright-report/
retention-days: 30