-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
830 additions
and
93 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,8 +32,35 @@ jobs: | |
- name: check output | ||
run: | | ||
jq . <<< '${{ steps.set.outputs.matrix }}' | ||
build-app: | ||
uses: GeoNet/Actions/.github/workflows/reusable-go-apps.yml@main | ||
with: | ||
buildSetup: | | ||
sudo apt-get -yq update | ||
sudo apt-get install -y xsltproc | ||
testSetup: | | ||
sudo apt-get -yq update | ||
sudo apt-get install -y xsltproc | ||
docker \ | ||
run -d \ | ||
-p 5432:5432 \ | ||
-e POSTGRES_PASSWORD=test \ | ||
-e POSTGRES_USER=fdsn_w \ | ||
-e POSTGRES_DB=fdsn \ | ||
--name postgres \ | ||
docker.io/postgis/postgis:15-3.3-alpine | ||
echo "Waiting until Postgres is ready..." | ||
until nc -zv -w 1 127.0.0.1 5432; do | ||
sleep 1s | ||
done | ||
sleep 5s | ||
docker logs postgres | ||
echo "Postgres is ready" | ||
psql postgresql://fdsn_w:[email protected]/fdsn --file=./etc/ddl/drop-create.ddl | ||
psql postgresql://fdsn_w:[email protected]/fdsn --file=./etc/ddl/create-users.ddl | ||
goTestExtraArgs: -p 1 | ||
build: | ||
needs: prepare | ||
needs: [prepare, build-app] | ||
strategy: | ||
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }} | ||
uses: GeoNet/Actions/.github/workflows/reusable-docker-build.yml@main | ||
|
@@ -66,52 +93,4 @@ jobs: | |
aws-region: ap-southeast-2 | ||
aws-role-arn-to-assume: arn:aws:iam::862640294325:role/github-actions-geonet-ecr-push | ||
aws-role-duration-seconds: "3600" | ||
go-build: | ||
if: ${{ contains(fromJSON('["workflow_call", "push", "pull_request"]'), github.event_name) && startsWith(github.repository, 'GeoNet/') != false }} | ||
uses: GeoNet/Actions/.github/workflows/reusable-go-build-smoke-test.yml@main | ||
with: | ||
paths: ${{ inputs.paths }} | ||
gofmt: | ||
if: ${{ contains(fromJSON('["workflow_call", "push", "pull_request"]'), github.event_name) && startsWith(github.repository, 'GeoNet/') != false }} | ||
uses: GeoNet/Actions/.github/workflows/reusable-gofmt.yml@main | ||
golangci-lint: | ||
if: ${{ contains(fromJSON('["workflow_call", "push", "pull_request"]'), github.event_name) && startsWith(github.repository, 'GeoNet/') != false }} | ||
uses: GeoNet/Actions/.github/workflows/reusable-golangci-lint.yml@main | ||
go-vet: | ||
if: ${{ contains(fromJSON('["workflow_call", "push", "pull_request"]'), github.event_name) && startsWith(github.repository, 'GeoNet/') != false }} | ||
uses: GeoNet/Actions/.github/workflows/reusable-go-vet.yml@main | ||
go-test: | ||
runs-on: ubuntu-latest | ||
env: | ||
AWS_REGION: ap-southeast-2 | ||
steps: | ||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | ||
- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 | ||
with: | ||
go-version-file: go.mod | ||
cache-dependency-path: go.sum | ||
check-latest: true | ||
- name: setup | ||
run: | | ||
sudo apt-get -yq update | ||
sudo apt-get install -y xsltproc | ||
docker \ | ||
run -d \ | ||
-p 5432:5432 \ | ||
-e POSTGRES_PASSWORD=test \ | ||
-e POSTGRES_USER=fdsn_w \ | ||
-e POSTGRES_DB=fdsn \ | ||
--name postgres \ | ||
docker.io/postgis/postgis:15-3.3-alpine | ||
echo "Waiting until Postgres is ready..." | ||
until nc -zv -w 1 127.0.0.1 5432; do | ||
sleep 1s | ||
done | ||
sleep 5s | ||
docker logs postgres | ||
echo "Postgres is ready" | ||
psql postgresql://fdsn_w:[email protected]/fdsn --file=./etc/ddl/drop-create.ddl | ||
psql postgresql://fdsn_w:[email protected]/fdsn --file=./etc/ddl/create-users.ddl | ||
- name: test | ||
run: | | ||
./all.sh | ||
|
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
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
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
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,7 +112,7 @@ var ( | |
s3Meta string | ||
) | ||
|
||
func init() { | ||
func initStationTemplate() { | ||
var err error | ||
var b bytes.Buffer | ||
|
||
|
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.