Skip to content

feat(global): primary color workflow & adjust (#136) #433

feat(global): primary color workflow & adjust (#136)

feat(global): primary color workflow & adjust (#136) #433

Workflow file for this run

name: CI
on:
push:
branches: [dev]
pull_request:
branches: [master, dev]
jobs:
e2e-test:
name: e2e test
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: groupher_server_ci
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
# - name: (Backend) checkout codebase
# uses: actions/checkout@v2
# with:
# fetch-depth: 0
# repository: 'groupher/groupher_server'
# path: 'backend_server'
# - name: (Backend) install libtinfo5
# run: sudo apt install libtinfo5
# - name: (Backend) Setup Elixir and OTP
# uses: actions/setup-elixir@v1
# with:
# elixir-version: '1.10.3'
# otp-version: '22.3'
# experimental-otp: true
# - name: (Backend) Restore dependencies cache
# uses: actions/cache@v2
# with:
# path: deps
# key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
# restore-keys: ${{ runner.os }}-mix-
# - name: (Backend) Checkout dev branch
# working-directory: ./backend_server
# run: git checkout debug-github-action-for-fe
# - name: (Backend) Install Packages
# working-directory: ./backend_server
# run: mix deps.get > /dev/null
# - name: (Backend) run migration
# working-directory: ./backend_server
# run: MIX_ENV=ci MIX_ENV=ci mix ecto.migrate > /dev/null
# - name: (Backend) set up test DB
# working-directory: ./backend_server
# run: MIX_ENV=ci mix ecto.setup > /dev/null
# - name: (Backend) seed data into DB
# working-directory: ./backend_server
# run: MIX_ENV=ci mix run priv/mock/cps_seeds.exs > /dev/null
# - name: (Backend) Run Server
# working-directory: ./backend_server
# run: MIX_ENV=ci mix phx.server &
- name: (Frontend) checkout codebase
uses: actions/checkout@v2
with:
fetch-depth: 0
repository: 'groupher/groupher_web'
path: 'frontend_server'
- name: (Frontend) setup node env
uses: actions/setup-node@v2
with:
node-version: '16.13.0'
- name: (Frontend) Install Packages
working-directory: ./frontend_server
run: npm install
- name: (Frontend) Setup Config CMD Tools
working-directory: ./frontend_server
run: chmod +x ./utils/bin/jq-linux; ./utils/bin/jq-linux -s '.[0] * .[1]' config/config.json config/config.ci.json > /tmp/config.json; cp /tmp/config.json ./config/config.json
- name: (Frontend) Build Project
working-directory: ./frontend_server
run: npm run build.ci
- name: cache the build
uses: actions/cache@v2
with:
path: |
~/.npm
${{ 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') }}-
# - name: (Frontend) Run e2e Tests
# working-directory: ./frontend_server
# run: npm run test:ci
# - name: (Frontend) Cypress run
# uses: cypress-io/github-action@v2
# with:
# working-directory: ./frontend_server
# # build: npm run build
# start: npm run ci
# wait-on: http://localhost:3000