Files
TheGame/.github/workflows/PR-CI.yml
dan13ram 8517a26048 Upgrade dependencies (#486)
* upgraded storybook dependencies

* upgraded web dependencies

* updated timezone selector

* upgrade chakra in metamaps

* upgraded react-dnd in metamaps

* upgraded framer-motion

* fixed types in metamaps

* upgraded eslint

* upgraded lerna, husky and graphql

* upgraded node version

* removed metamaps package

* fixed all eslint issues

* ran yarn format to prettier format all files

* updated lint-staged & husky scripts

* add executable perms to pre-push scripts

* updated yarn.lock

* fixed eslint and moved chakra icons to ds

* fixed emotion errors

* removed extra useContext

* update yarn.lock

* upgraded more packages

* removed unnecessary .huskyrc.json

* lint fix
2021-05-01 12:46:48 +05:30

100 lines
2.2 KiB
YAML

name: TheGame CI
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
test:
name: Run Tests
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: nodeModules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install packages
run: yarn --frozen-lockfile
env:
CI: true
- name: Typechecking
run: yarn typecheck
env:
CI: true
- name: Linting
run: yarn lint
env:
CI: true
- name: Testing
run: yarn test --ci --coverage
env:
CI: true
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.4.0
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.x
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: nodeModules-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
- name: Install packages
run: yarn --frozen-lockfile
env:
CI: true
- name: Build Backend
run: yarn backend:build
env:
CI: true
# Spin up the backend / hasura / DB for the web build to point to
- name: Run docker-compose
run: docker-compose up --build -d
env:
DATABASE_USER: metagame
DATABASE_PASSWORD: postgres
DATABASE_DB: metagame-db
HASURA_GRAPHQL_ADMIN_SECRET: so-secretish
HASURA_PORT: 8080
- name: Debug docker containers
run: docker ps -a
- name: Build Web
run: yarn wait-on http://localhost:4000/healthz && yarn web:build
env:
CI: true
NEXT_PUBLIC_GRAPHQL_URL: http://localhost:8080/v1/graphql