chore(deps): bump nanoid from 3.3.4 to 3.3.8 #556
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: production.Dockerfile CI | |
on: [pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- "0.0.0.0:5432:5432" | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# TODO: we should be able to get rid of Node here | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install pg_dump | |
run: | | |
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get -yqq install postgresql-client-14 | |
- name: setup database | |
run: | | |
cp .env.ci .env | |
yarn --immutable | |
CONFIRM_DROP=1 yarn setup | |
env: | |
CI: true | |
- name: "Run docker server build" | |
run: | |
docker build --file production.Dockerfile --build-arg ROOT_URL="http://localhost:5678" --build-arg | |
TARGET="server" --tag gs-server . | |
- name: "Run docker worker build" | |
run: | |
docker build --file production.Dockerfile --build-arg ROOT_URL="http://localhost:5678" --build-arg | |
TARGET="worker" --tag gs-worker . | |
- name: "ifconfig -a" | |
run: "ifconfig -a" | |
- name: "Start docker server" | |
run: | |
docker run --rm -d --init -p 5678:5678 --env-file .env -e NODE_ENV=production -e DATABASE_HOST=172.17.0.1 | |
--name gs-server gs-server | |
- name: "Start docker worker" | |
run: | |
docker run --rm -d --init --env-file .env -e NODE_ENV=production -e DATABASE_HOST=172.17.0.1 --name gs-worker | |
gs-worker | |
- name: "Test docker" | |
run: node .github/workflows/test-docker.js | |
- name: "Tear down docker" | |
run: docker kill gs-server gs-worker |