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
# Get values for cache paths to be used in later steps | |
- id: go-cache-paths | |
run: | | |
echo "::set-output name=go-build::$(go env GOCACHE)" | |
echo "::set-output name=go-mod::$(go env GOMODCACHE)" | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Cache go build cache, used to speedup go test |
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: Release | |
run: ./script/build/release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} |
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: Test CLI | |
uses: actions/bin/bats@master | |
with: | |
args: ./script/test/*.bats |
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
services: | |
postgres: | |
image: postgres:11 | |
ports: | |
- 5432:5432 | |
env: | |
POSTGRES_DB: flipt_test | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: '' |
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
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v1 | |
with: | |
go-version: ${{ matrix.go }} | |
id: go |
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
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
go: ['1.12', '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
name: Publish Docs | |
uses: ./.github/actions/publish-docs | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
FROM python:2.7 | |
RUN pip install mkdocs mkdocs-material pygments | |
COPY entrypoint.sh /entrypoint.sh | |
ENTRYPOINT ["/entrypoint.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
func fixture(path string) string { | |
b, err := ioutil.ReadFile("testdata/fixtures/" + path) | |
if err != nil { | |
panic(err) | |
} | |
return string(b) | |
} | |
func TestListRepos(t *testing.T) { | |
teardown := setup() |
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
func TestListRepos(t *testing.T) { | |
teardown := setup() | |
defer teardown() | |
mux.HandleFunc("/orgs/octokit/repos", func(w http.ResponseWriter, r *http.Request) { | |
w.Header().Set("Content-Type", "application/json") | |
w.WriteHeader(http.StatusOK) | |
// ... return the JSON | |
}) | |
NewerOlder