From c9c21e6a673ffa81fa85d301ca44bf489627486a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Omar=20L=C3=B3pez?= Date: Thu, 13 Jan 2022 12:51:15 -0700 Subject: [PATCH] Github Workflow cleanup (#1504) * Update lint.yml * Build and e2e on PRs * Adds security checks for PRs * removes build workflow Is not needed anymore thanks to E2E --- .github/workflows/build.yml | 67 ------------------------------------- 1 file changed, 67 deletions(-) delete mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 85a71a9821..0000000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Build -on: - pull_request_target: - branches: - - main -jobs: - approve: - runs-on: ubuntu-latest - - steps: - - name: Approve - run: echo For security reasons, all pull requests need to be approved first before running any automated CI. - - build: - needs: [approve] # Require the first step to finish - timeout-minutes: 5 - name: Build on Node ${{ matrix.node }} and ${{ matrix.os }} - environment: - name: Preview - env: - DATABASE_URL: postgresql://postgres:@localhost:5432/calendso - NODE_ENV: test - BASE_URL: http://localhost:3000 - JWT_SECRET: secret - PLAYWRIGHT_SECRET: ${{ secrets.CI_PLAYWRIGHT_SECRET }} - services: - postgres: - image: postgres:12.1 - env: - POSTGRES_USER: postgres - POSTGRES_DB: calendso - ports: - - 5432:5432 - runs-on: ${{ matrix.os }} - strategy: - matrix: - node: ["14.x"] - os: [ubuntu-latest] - - steps: - - name: Checkout repo - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.sha }} - fetch-depth: 2 - - - name: Use Node ${{ matrix.node }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node }} - - - name: Install deps - uses: bahmutov/npm-install@v1 - - - name: Next.js cache - uses: actions/cache@v2 - with: - path: ${{ github.workspace }}/.next/cache - # Generate a new cache whenever packages or source files change. - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} - # If source files changed but packages didn't, rebuild from a prior cache. - restore-keys: | - ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}- - - - run: yarn prisma migrate deploy - - run: yarn test - - run: yarn build