Skip to content

feat: add e2e unittest framework #441

feat: add e2e unittest framework

feat: add e2e unittest framework #441

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
codecov:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2.1.4
with:
go-version: 1.18
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Test and update codecov
run: |
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
- uses: codecov/codecov-action@v2
with:
file: ./coverage.txt
flags: unittests
fail_ci_if_error: true
docker-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: thebeatles1994/open-local
tags: |
type=ref,event=tag
- name: Build image
uses: docker/build-push-action@v2.5.0
with:
context: .
file: ./Dockerfile
platforms: linux/amd64
push: false
tags: ${{ steps.meta.outputs.tags }}