Skip to content

Update module github.com/twilio/twilio-go to v1 #198

Update module github.com/twilio/twilio-go to v1

Update module github.com/twilio/twilio-go to v1 #198

Workflow file for this run

on:
push:
env:
TEST_TAG: petetanton/klaxn-api:test
LATEST_TAG: petetanton/klaxn-api:latest
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- name: generate swagger docs
run: |
go mod tidy
go install github.com/swaggo/swag/cmd/[email protected]
~/go/bin/swag init --parseDependency --parseInternal
- name: commit swagger docs
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update swagger docs
file_pattern: 'docs/*'
# - name: build
# run: |
# GOOS=linux go build -o klaxn-api main.go
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and export to Docker
uses: docker/build-push-action@v4
with:
context: .
# load: true
push: true
tags: ${{ env.TEST_TAG }}
platforms: |
linux/amd64
linux/arm64
# - name: Test
# run: |
# docker run --rm ${{ env.TEST_TAG }}
integration-test:
runs-on: ubuntu-latest
needs: [build]
services:
postgres:
image: postgres:15-alpine
env:
POSTGRES_USER: klaxn
POSTGRES_PASSWORD: klaxn
klaxn-api:
image: petetanton/klaxn-api:test
env:
DB_HOSTNAME: postgres
DB_USER: postgres
DB_PASSWORD: postgres
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- name: Run tests
run: |
TF_ACC=true KLAXN_URL=http://klaxn-api:8080 go test -v ./...