diff --git a/.github/actions/docker-compose/action.yml b/.github/actions/docker-compose/action.yml deleted file mode 100644 index a5c7dec..0000000 --- a/.github/actions/docker-compose/action.yml +++ /dev/null @@ -1,11 +0,0 @@ -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 \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 09b2480..4b50f74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,8 +19,18 @@ jobs: - name: Install dependencies run: cd backend && npm install - - name: Start services - uses: ./.github/actions/docker-compose + - name: Start volume + run: docker volume create db + + - name: Start database + run: docker run -d \ + --name db \ + -e MYSQL_ROOT_PASSWORD=root \ + -e MYSQL_DATABASE=techstart-fashion \ + -p 3306:3306 \ + -v db:/var/lib/mysql \ + --restart always \ + mysql - name: Test run: cd backend && npm run test diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 71b453f..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,16 +0,0 @@ -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