Removed submodules, updated dependencies, msig-alias removal indexing #405
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: build-check | |
on: | |
push: | |
branches: [c4t, dev] | |
pull_request: | |
branches: [c4t, dev] | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
go: | |
- '1.19' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Submodules | |
run: git submodule update --init --recursive | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.52.2 | |
args: --timeout 5m | |
test-and-build: | |
name: Test and build on Go ${{ matrix.go }} | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
go: | |
- '1.19' | |
services: | |
mysql: | |
image: mysql:8.0.26 | |
ports: | |
- 3306:3306 | |
env: | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: magellan_test | |
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Submodules | |
run: git submodule update --init --recursive | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Test binary build | |
run: go build cmds/magelland/magelland.go | |
- name: Migrate the database | |
run: | | |
curl -L https://github.com/golang-migrate/migrate/releases/download/v4.11.0/migrate.linux-amd64.tar.gz | tar xvz | |
./migrate.linux-amd64 -path=services/db/migrations/ -database "mysql://root:password@tcp(127.0.0.1:3306)/magellan_test" up | |
- name: Run tests | |
run: make tests | |