-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b48c11c
commit 3219976
Showing
1 changed file
with
12 additions
and
12 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,26 +15,26 @@ jobs: | |
uses: actions/[email protected] | ||
|
||
- name: Build Docker image | ||
run: docker-compose build | ||
run: docker compose build | ||
|
||
- name: Run Docker Compose file | ||
run: docker-compose up -d && sleep 10 | ||
run: docker compose up -d && sleep 10 | ||
|
||
- name: Run unit tests | ||
run: docker-compose run --rm app npm test | ||
run: docker compose run --rm app npm test | ||
|
||
- name: Run integration tests | ||
run: | | ||
docker-compose run --rm app npx sequelize-cli db:drop | ||
docker-compose run --rm app npx sequelize-cli db:create | ||
docker-compose run --rm app npx sequelize-cli db:migrate | ||
docker-compose run --rm app npm run start:dev & | ||
docker compose run --rm app npx sequelize-cli db:drop | ||
docker compose run --rm app npx sequelize-cli db:create | ||
docker compose run --rm app npx sequelize-cli db:migrate | ||
docker compose run --rm app npm run start:dev & | ||
sleep 10 | ||
docker-compose run --rm app npm install cypress cypress-json-results | ||
docker-compose run --rm app npx cypress run | ||
docker compose run --rm app npm install cypress cypress-json-results | ||
docker compose run --rm app npx cypress run | ||
- name: Stop and remove Docker containers | ||
run: docker-compose down | ||
run: docker compose down | ||
|
||
- name: Setup SSH | ||
run: | | ||
|
@@ -50,7 +50,7 @@ jobs: | |
username: ${{ secrets.SERVER_USER }} | ||
key: ${{ secrets.SERVER_SSH_KEY }} | ||
script: | | ||
docker pull your-docker-repo/todo-app:latest | ||
docker pull todo-app:latest | ||
docker stop todo-app || true | ||
docker rm todo-app || true | ||
docker run -d --name todo-app -p 80:80 your-docker-repo/todo-app:latest | ||
docker run -d --name todo-app -p 80:80 todo-app:latest |