forked from nyaruka/rp-archiver
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request nyaruka#37 from nyaruka/actions
Convert to github actions
- Loading branch information
Showing
6 changed files
with
132 additions
and
72 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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
jobs: | ||
test: | ||
name: Test | ||
strategy: | ||
matrix: | ||
pg-version: ['10', '11'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install PostgreSQL | ||
uses: harmon758/postgresql-action@v1 | ||
with: | ||
postgresql version: ${{ matrix.pg-version }} | ||
postgresql db: archiver_test | ||
postgresql user: temba | ||
postgresql password: temba | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.x | ||
|
||
- name: Run tests | ||
run: go test -p=1 -coverprofile=coverage.text -covermode=atomic ./... | ||
env: | ||
ARCHIVER_AWS_ACCESS_KEY_ID: ${{ secrets.ARCHIVER_AWS_ACCESS_KEY_ID }} | ||
ARCHIVER_AWS_SECRET_ACCESS_KEY: ${{ secrets.ARCHIVER_AWS_SECRET_ACCESS_KEY }} | ||
|
||
- name: Upload coverage | ||
if: success() | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
release: | ||
name: Release | ||
needs: [test] | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.13.x | ||
|
||
- name: Publish release | ||
uses: goreleaser/goreleaser-action@v1 | ||
with: | ||
version: latest | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,25 +1,29 @@ | ||
module github.com/nyaruka/rp-archiver | ||
|
||
go 1.12 | ||
|
||
require ( | ||
github.com/aws/aws-sdk-go v1.13.47 | ||
github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261 | ||
github.com/davecgh/go-spew v1.1.0 | ||
github.com/certifi/gocertifi v0.0.0-20180118203423-deb3ae2ef261 // indirect | ||
github.com/davecgh/go-spew v1.1.0 // indirect | ||
github.com/evalphobia/logrus_sentry v0.4.5 | ||
github.com/fatih/structs v1.0.0 | ||
github.com/getsentry/raven-go v0.0.0-20180430182053-263040ce1a36 | ||
github.com/go-ini/ini v1.36.0 | ||
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 | ||
github.com/getsentry/raven-go v0.0.0-20180430182053-263040ce1a36 // indirect | ||
github.com/go-ini/ini v1.36.0 // indirect | ||
github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8 // indirect | ||
github.com/jmoiron/sqlx v1.2.0 | ||
github.com/kylelemons/godebug v1.1.0 // indirect | ||
github.com/lib/pq v1.0.0 | ||
github.com/naoina/go-stringutil v0.1.0 | ||
github.com/naoina/toml v0.1.1 | ||
github.com/nyaruka/ezconf v0.2.1 | ||
github.com/onsi/ginkgo v1.10.3 // indirect | ||
github.com/onsi/gomega v1.7.1 // indirect | ||
github.com/pkg/errors v0.8.1 | ||
github.com/pmezard/go-difflib v1.0.0 | ||
github.com/pmezard/go-difflib v1.0.0 // indirect | ||
github.com/sirupsen/logrus v1.0.5 | ||
github.com/smartystreets/goconvey v1.6.4 // indirect | ||
github.com/stretchr/testify v1.2.1 | ||
golang.org/x/crypto v0.0.0-20180509205747-2d027ae1dddd | ||
golang.org/x/sys v0.0.0-20180511165053-d0faeb539838 | ||
golang.org/x/net v0.0.0-20191119073136-fc4aabc6c914 // indirect | ||
google.golang.org/appengine v1.6.5 // indirect | ||
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect | ||
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect | ||
gopkg.in/ini.v1 v1.51.0 // indirect | ||
) | ||
|
||
go 1.13 |
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