Added grpc method for getting user #51
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: TgTime API Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [1.22.x] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Add config | |
run: | | |
touch ./.env | |
echo ENV="dev" >> .env | |
echo HTTP_HOST=8081 >> .env | |
echo DATABASE_HOST="db" >> .env | |
echo DATABASE_PORT="5432" >> .env | |
echo DATABASE_NAME="officetime" >> .env | |
echo DATABASE_USER="officetime" >> .env | |
echo DATABASE_PASSWORD="officetime" >> .env | |
echo DATABASE_SSL_MODE="disable" >> .env | |
echo AUTH_SIGNING_KEY="vtlcgjgek" >> .env | |
echo AUTH_REFRESH_KEY="vtlcgjgek" >> .env | |
echo AUTH_ACCESS_TOKEN_EXPIRES="30" >> .env | |
echo AUTH_REFRESH_TOKEN_EXPIRES="168" >> .env | |
cat ./.env | |
- name: Build containers | |
run: docker compose -f docker-compose.yml -f docker-compose.dev.yml build | |
- name: Start containers | |
run: docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d | |
- name: Health check | |
run: | | |
docker logs --since=25m tgtime-api-db | |
docker compose ps | |
docker run --network container:tgtime-api-app appropriate/curl -s --retry 10 --retry-connrefused --retry-delay 5 --retry-max-time 30 http://localhost:8081/service/status | |
- name: Stop containers | |
if: always() | |
run: docker compose -f docker-compose.yml -f docker-compose.dev.yml down |