Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: install docker-compose #1115

Merged
merged 2 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_AUTH_TOKEN }}

- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose

- name: Run Unit Tests
run: make test-docker version=${{ matrix.php }}

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ test.php
.idea/
*.code-workspace
.vscode
prism*
prism/
temp.php
TODO.txt
sendgrid-php.zip
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ test-integ: test

version ?= latest
test-docker:
curl -s https://raw.githubusercontent.com/sendgrid/sendgrid-oai/HEAD/prism/prism.sh -o prism.sh
dependencies=lowest version=$(version) bash ./prism.sh
dependencies=highest version=$(version) bash ./prism.sh

Expand Down
15 changes: 15 additions & 0 deletions prism.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -e

rm -rf prism && mkdir -p prism && cd prism
git clone --depth 1 https://github.com/sendgrid/sendgrid-oai .
cd prism

docker compose build --parallel

if [ -z "$command" ]; then
docker compose up --force-recreate --abort-on-container-exit --remove-orphans
else
docker compose run helper-runner "$command"
docker compose down
fi
Loading