Skip to content

Finish 83_reduce_docker_img_size #53

Finish 83_reduce_docker_img_size

Finish 83_reduce_docker_img_size #53

Workflow file for this run

name: Go CI
on:
pull_request:
branches: [develop, master]
push:
branches: [develop, master]
jobs:
build-linux:
name: Build Ferrum on linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- name: Set up Go
uses: actions/setup-go@v5.2.0
with:
go-version: '1.24'
- name: Build
run: go version && go build -v ./...
build-windows:
name: Build Ferrum on windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4.1.7
- name: Set up Go
uses: actions/setup-go@v5.2.0
with:
go-version: '1.24'
- name: Build
run: go version && go build -v ./...
all-tests-linux:
name: Run all tests on linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- name: Set up Go
uses: actions/setup-go@v5.2.0
with:
go-version: '1.24'
- name: Set up Redis Stack server
run: docker compose up -d redis
- name: Get Redis logs
run: docker logs $(docker ps -aqf "name=wissance_ferrum_db")
- name: Test all
run: go version && go mod tidy && go test -v -covermode=count -coverprofile=coverage.out ./...
- name: Upload coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# If your repo is private, uncomment the next line and set the secret
# coveralls-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
path-to-lcov: coverage.out
#all-tests-windows:
# name: Run all tests on windows
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v4.1.7
# - name: Set up Go
# uses: actions/setup-go@v5.0.2
# - name: Redis Stack Server
# run: docker compose up -d redis
# - name: Get Redis logs
# run: docker logs $(docker ps -aqf "name=wissance_ferrum_db")
# - name: Test all
# run: go test -v ./...
# on windows don't work linux containers by default
lint:
name: Run golangci linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.7
- name: Set up Go
uses: actions/setup-go@v5.2.0
with:
go-version: '1.24'
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6.1.0
with:
version: v2.7.2
args: --timeout 5m --config .golangci.yaml