Skip to content
Open
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
49 changes: 49 additions & 0 deletions .github/workflows/trips-build-cicd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Trips CI

env:
registry: openhackggp0ljh0acr.azurecr.io
repository: devopsoh/api-trips
docker_path: apis/trips
staging_url: https://openhackggp0ljh0trips-staging.azurewebsites.net
prod_url: https://openhackggp0ljh0trips.azurewebsites.net
resource_group: openhackggp0ljh0rg
webapp_name: openhackggp0ljh0trips
build_name: Trips
webv_path: apis/trips/webvalidate

on:
push:
branches: [ main ]
paths:
- apis/trips/**
- '.github/workflows/trips-build-cicd.yaml'
pull_request:
branches: [ main ]
paths:
- apis/trips/**
- '.github/workflows/trips-build-cicd.yaml'

jobs:
build_and_test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
working-directory: apis/trips
steps:
- uses: actions/checkout@v2

- name: Setup Go environment
uses: actions/setup-go@v2.0.3
with:
go-version: 1.12

- name: Install Go dependencies
run: go get

- name: Build
run: go build -v
working-directory: apis/trips

- name: Run Unit Tests
run: go test ./tests
6 changes: 3 additions & 3 deletions apis/trips/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Overview

This is the Trips API for the MyDriving service.
This is the Trips API for the MyDriving service. test

The server was generated by the [swagger-codegen]
(https://github.com/swagger-api/swagger-codegen) project.
(https://github.com/swagger-api/swagger-codegen) project.
By using the [OpenAPI-Spec](https://github.com/OAI/OpenAPI-Specification) from a remote server, you can easily generate a server stub.

## Running the server
Expand Down Expand Up @@ -38,4 +38,4 @@ To run all integration tests:
go test ./tripsgo
```

> Note: this requires an actual database connection, so the required ENV variables need to be present.
> Note: this requires an actual database connection, so the required ENV variables need to be present.