Skip to content

fix(auth): 132 Add redirection after login #345

fix(auth): 132 Add redirection after login

fix(auth): 132 Add redirection after login #345

Workflow file for this run

name: ⛷ PR tests
env:
CI: true
NODE_VERSION: 18
defaults:
run:
shell: bash
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
runs-on: ubuntu-latest
services:
# Postgres image for backend integration tests
postgres:
image: postgres:14-alpine
env:
POSTGRES_DB: seed
POSTGRES_USER: seed
POSTGRES_PASSWORD: Ge0rgesMoustaki
ports:
# Maps tcp port 5432 on service container to the host
- 5434:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 7.14.1
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: linters
run: pnpm lint
- name: build
run: pnpm build
- name: Tests
run: pnpm test
- name: Dependency Cruiser
run: pnpm test:circular
security-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/[email protected]
with:
version: 7.14.1
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Check for vulnerable dependencies
run: pnpm run security
frontend_build_and_deploy:
needs: test
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
env:
surge_url: wfp-dmp-${{ github.event.pull_request.number }}.surge.sh
steps:
- uses: actions/checkout@v3
- uses: pnpm/[email protected]
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Build Interfaces & Frontend
run: pnpm turbo build
env:
NEXT_PUBLIC_API_BASE_URL: https://staging-api-dmp.ovio.org
- name: Export to static HTML
run: |
cd apps/frontend
./gen_env.sh staging
pnpm next export
cd out
cp index.html 200.html
- name: Deploy on surge
uses: dswistowski/surge-sh-action@v1
with:
domain: ${{ env.surge_url }}
project: "apps/frontend/out/."
login: ${{ secrets.surge_login }}
token: ${{ secrets.surge_token }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H:%M:%S')"
- name: Comment PR
uses: marocchino/sticky-pull-request-comment@v1
continue-on-error: true
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
message: |
Build succeeded and deployed at https://${{ env.surge_url }}
(hash ${{ github.event.pull_request.head.sha }} deployed at ${{ steps.date.outputs.date }})