fix: API Response #36
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
name: Go testing | |
on: | |
push: | |
branches: ["develop", "bugfixes"] | |
pull_request: | |
branches: ["develop"] | |
jobs: | |
small_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22.1" | |
- name: execute small test | |
run: | | |
cd internal/cart | |
go test -run TestCartUtils | |
midium_tests: | |
runs-on: ubuntu-latest | |
needs: small_tests | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.22.1" | |
- name: Setup databases | |
run: | | |
sudo apt-get update | |
sudo apt install docker docker-compose -y | |
curl -s https://packages.stripe.dev/api/security/keypair/stripe-cli-gpg/public | gpg --dearmor | sudo tee /usr/share/keyrings/stripe.gpg | |
echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe.dev/stripe-cli-debian-local stable main" | sudo tee -a /etc/apt/sources.list.d/stripe.list | |
sudo apt update | |
sudo apt install stripe | |
bash test_server.sh & | |
sleep 10 | |
- name: execute midium test | |
run: | | |
cd internal/cart | |
go test -run TestRepository | |
go test -run TestCartRequests |