Merge pull request #155 from Pix4D/set-intersection #622
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
# See https://docs.github.com/en/actions/reference/ | |
on: [push] | |
name: ci | |
env: | |
go-version: 1.22.x | |
task-version: v3.28.0 | |
jobs: | |
all: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ env.go-version }} | |
- name: Install Task | |
run: go install github.com/go-task/task/v3/cmd/task@${{ env.task-version }} | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
# By default, actions/checkout will persist the GITHUB_TOKEN, so that further | |
# steps in the job can perform authenticated git commands (that is: WRITE to | |
# the repo). Following the Principle of least privilege, we disable this as long | |
# as we don't need it. | |
persist-credentials: false | |
- run: task ci:setup | |
- run: task lint | |
- run: task build | |
- run: task test:all | |
env: | |
COGITO_TEST_OAUTH_TOKEN: ${{ secrets.COGITO_TEST_OAUTH_TOKEN }} | |
COGITO_TEST_GCHAT_HOOK: ${{ secrets.COGITO_TEST_GCHAT_HOOK }} | |
- run: task docker:build | |
- run: task docker:smoke | |
- run: task docker:login | |
env: | |
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} | |
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }} | |
- run: task docker:push | |
- run: task docker:maybe-push-release | |
- run: task ci:teardown | |
# ALWAYS run this step, also if any previous step failed. | |
if: always() |