Skip to content

Commit

Permalink
fix: Continuous integration improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Axeloooo committed Nov 19, 2023
1 parent 4afa61a commit 0664f6b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/actions/docker-compose/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: 'Docker-Compose Setup'
description: 'Sets up docker-compose'
runs:
using: 'composite'
steps:
- name: Download Docker-Compose plugin
shell: bash
run: curl -SL https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
- name: Make plugin executable
shell: bash
run: sudo chmod +x /usr/local/bin/docker-compose
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ jobs:
testing:
runs-on: ubuntu-latest
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
DATABASE_URL: mysql://root:root@localhost:3306/techstart-fashion
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Install dependencies
run: cd backend && npm install

- name: Start services
uses: ./.github/actions/docker-compose

- name: Test
run: cd backend && npm run test
16 changes: 16 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: "3.8"
services:
db:
image: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: techstart-fashion
ports:
- 3306:3306
volumes:
- db:/var/lib/mysql

volumes:
db:
driver: local

0 comments on commit 0664f6b

Please sign in to comment.