Skip to content

Commit

Permalink
wip: try docker compose instead
Browse files Browse the repository at this point in the history
  • Loading branch information
drujensen committed Nov 12, 2022
1 parent 0040b4d commit 8e46a44
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ jobs:

steps:
- name: Update & install dependencies
run: apt update && apt install -y libpq-dev libsqlite3-dev libreadline-dev curl
run: apt-get update -qq && apt-get install -y libpq-dev libsqlite3-dev libreadline-dev curl

- name: Download nodejs
run: curl -sL https://deb.nodesource.com/setup_14.x | bash -

- name: Install nodejs
run: apt-get install -y nodejs
- name: Install node
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Download source
uses: actions/checkout@v3
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/docker-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docker CI

on:
push:

jobs:
docker:
timeout-minutes: 10
runs-on: ubuntu-latest

steps:
- name: Checkout
users: actions/checkout@v3

- name: Start containers
run: docker-compose up -d redis postgres

- name: Build image
run: docker-compose build

- name: Run tests
run: docker-compose run spec

- name: Stop containers
if: always()
run: docker-compose down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM crystallang/crystal:latest

# Install Dependencies
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update -qq && apt install -y libpq-dev libsqlite3-dev libmysqlclient-dev libreadline-dev curl vim
RUN apt-get update -qq && apt-get install -y libpq-dev libsqlite3-dev libmysqlclient-dev libreadline-dev curl vim

# Install nodejs
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
Expand Down

0 comments on commit 8e46a44

Please sign in to comment.