Configure Renovate #8
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: Dockerfile CI | |
on: [pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
services: | |
redis: | |
image: redis | |
ports: | |
- "0.0.0.0:6379:6379" | |
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 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: setup database | |
run: | | |
cp .env.ci .env | |
yarn --frozen-lockfile | |
env: | |
CI: true | |
- name: "Run docker server build" | |
run: | |
docker build --tag celluloid-server . | |
- name: "ifconfig -a" | |
run: "ifconfig -a" | |
- name: "Start docker server" | |
run: | |
docker run --rm -d --init -p 3001:3001 --env-file .env -e NODE_ENV=production -e CELLULOID_PG_HOST=172.17.0.1 -e CELLULOID_REDIS_URL=redis://172.17.0.1 | |
--name celluloid-server celluloid-server | |
- name: "Test docker" | |
run: node .github/workflows/test-docker.js | |
- name: "Tear down docker" | |
run: docker kill celluloid-server |