Skip to content

Support ARM builds #722

Support ARM builds

Support ARM builds #722

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- master
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: ci/checkout-repo
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version-file: go.mod
cache: true
- name: ci/check-style
run: make check-style
- name: ci/check-modules
run: make check-modules
mocks:
runs-on: ubuntu-20.04 # TODO: move check-mocks back to the newest Ubuntu release
steps:
- name: ci/checkout-repo
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version-file: go.mod
cache: true
- name: ci/check-mocks
run: make verify-mocks
test:
runs-on: ubuntu-22.04
services:
postgres:
image: cimg/postgres:14.8
env:
POSTGRES_USER: cloud_test
POSTGRES_DB: cloud_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: ci/checkout-repo
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
cache: true
go-version-file: go.mod
- name: ci/test-postgres
run: make unittest goverall
env:
CLOUD_DATABASE: postgres://cloud_test@localhost:5432/cloud_test?sslmode=disable
- name: ci/test-testwick
run: make unittest
working-directory: ./cmd/tools/testwick
build:
runs-on: ubuntu-22.04
needs:
- test
- lint
steps:
- name: ci/checkout-repo
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
with:
fetch-depth: 0
- name: ci/generate-tag
run: |
if [ "${{ github.event_name }}" == "pull_request" ]
then
SHA=${{ github.event.pull_request.head.sha }}
else [ "${{ github.event_name }}" == 'push' ]
SHA=${GITHUB_SHA}
fi
echo "TAG=${SHA:0:7}" >> $GITHUB_ENV
- name: ci/build-docker
env:
REF_NAME: ${{ github.ref_name }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
uses: ./.github/actions/docker-build