Skip to content

Upgrade deps

Upgrade deps #472

Workflow file for this run

name: Build and Test
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
product_name: db-operator
go_version: "1.18"
go_os: linux
go_arch: amd64
main_go_path: .
jobs:
lint: ## https://github.com/golangci/golangci-lint-action#how-to-use
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Check Code Style
uses: golangci/golangci-lint-action@v3
with:
version: v1.49.0 ## https://github.com/golangci/golangci-lint/releases
args: --timeout 3m0s
unit-test:
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.go_version }}
# The existing apparmor profile for mysql needs to be removed.
# https://github.com/actions/virtual-environments/issues/181
# https://github.com/moby/moby/issues/7512#issuecomment-51845976
- name: Remove MySQL App Armour Configuration
run: |
set -x
sudo apt-get update
sudo apt-get remove mysql-server --purge
sudo apt-get install apparmor-profiles
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
- name: Start dependencies using docker-compose
run: docker-compose up -d
- name: Run the unit tests
run: go test -tags tests ./... -v -cover