Skip to content

'Dump' command

'Dump' command #462

Workflow file for this run

name: Gleece CI/CD ⚙️
on: [push, workflow_dispatch]
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
run_on_main: false
- os: windows-latest
run_on_main: true # Windows runs much slower (6 min vs 1.5 min on Linux), and in 99% of cases there's no OS difference - run it only on the main branch.
runs-on: ${{ matrix.os }}
steps:
- name: 1️⃣ Checkout repository 🛎️
if: ${{ !matrix.run_on_main || github.ref == 'refs/heads/main' }}
uses: actions/checkout@v4
- name: Cache Go modules 🗄️
if: ${{ !matrix.run_on_main || github.ref == 'refs/heads/main' }}
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
~/go/bin
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: 2️⃣ Set up Go 🚀
if: ${{ !matrix.run_on_main || github.ref == 'refs/heads/main' }}
uses: actions/setup-go@v5
with:
go-version: '1.23.3'
- name: 3️⃣ Install dependencies 📦
if: ${{ !matrix.run_on_main || github.ref == 'refs/heads/main' }}
run: |
go mod download
go install github.com/onsi/ginkgo/v2/ginkgo@v2.27.2
go install github.com/mattn/goveralls@latest
- name: 4️⃣ Run tests 🧪
# In Windows run tests (not coverage) on main only, for Linux run tests but skip it on main, to run the coverage
if: ${{ (matrix.run_on_main && github.ref == 'refs/heads/main') || (!matrix.run_on_main && github.ref != 'refs/heads/main') }}
run: ginkgo ./...
- name: 5️⃣ Send coverage 📊
# run coverage only for Linux only on main
if: ${{ !matrix.run_on_main && github.ref == 'refs/heads/main' }}
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir dist
go test -covermode atomic -coverpkg=$(go list ./... | grep -vE "/test/|/e2e/" | tr '\n' ',') -coverprofile=dist/covprofile ./...
goveralls -coverprofile=dist/covprofile -service=github