Skip to content

initial filters implementation, wip #1

initial filters implementation, wip

initial filters implementation, wip #1

name: build-and-test
on:
push:
branches:
- main
tags:
- v*
pull_request:
types: [opened, edited]
pull_request_target:
types: [opened, edited]
env:
GO_VERSION: "~1.22"
GO111MODULE: "on"
jobs:
test-build:
runs-on: ubuntu-latest
steps:
- name: Install Task
uses: arduino/setup-task@v2
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: go.mod
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache-go-packages
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build Application
run: task build
- name: Run functional test
env:
EGET_CONFIG: ./eget.toml
EGET_BIN: ''
TEST_EGET: ../dist/eget
run: cd test && go run test_eget.go
run-tests:
runs-on: ubuntu-latest
steps:
- name: Install Task
uses: arduino/setup-task@v2
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache-go-packages
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install ginkgo
run: go install github.com/onsi/ginkgo/v2/ginkgo
- name: generate ginkgo bootstrap files
run: task ginkgo-bootstrap
- name: Run unit tests with coverage
working-directory: ${{ github.workspace }}
env:
GINKGO_PRESERVE_CACHE: "true"
run: go test -coverprofile ./coverprofile.out -v ./lib/** ./app
- name: Upload coverage reports to Codecov
if: ${{success()}}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverprofile.out
#,ginkgo.xml