Skip to content

feat: Add recovery middleware for GRPC server #558

feat: Add recovery middleware for GRPC server

feat: Add recovery middleware for GRPC server #558

Workflow file for this run

name: CI
on: push
env:
DOCKER_CACHE_PATH: ${{ github.workspace }}/tmp/docker-cache
DOCKER_BUILDKIT: 1
BUILDX_CACHE_PATH: /tmp/.buildx-cache
jobs:
build:
name: build
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Inject slug/short variables
# A GitHub Action to expose the slug values of some GitHub ENV variables
# https://github.com/rlespinasse/github-slug-action
uses: rlespinasse/[email protected]
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: ${{ env.BUILDX_CACHE_PATH }}
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- uses: docker/build-push-action@v3
# GitHub Action to build and push Docker images with Buildx
# https://github.com/docker/build-push-action
name: Build image
with:
push: false
target: builder
tags: ${{ github.repository }}:${{ env.GITHUB_SHA_SHORT }}
cache-from: type=local,src=${{ env.BUILDX_CACHE_PATH }}
cache-to: type=local,dest=${{ env.BUILDX_CACHE_PATH }}
check:
name: check
runs-on: ubuntu-20.04
needs: build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Inject slug/short variables
# A GitHub Action to expose the slug values of some GitHub ENV variables
# https://github.com/rlespinasse/github-slug-action
uses: rlespinasse/[email protected]
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Get cached Docker layers
uses: actions/cache@v3
with:
path: ${{ env.BUILDX_CACHE_PATH }}
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- uses: docker/build-push-action@v3
# GitHub Action to build and push Docker images with Buildx
# https://github.com/docker/build-push-action
name: Build image
with:
push: false
target: linter
tags: ${{ github.repository }}:${{ env.GITHUB_SHA_SHORT }}
cache-from: type=local,src=${{ env.BUILDX_CACHE_PATH }}
load: true
- uses: addnab/docker-run-action@v2
# Run an image built by a previous step.
# https://github.com/addnab/docker-run-action
# https://github.com/marketplace/actions/docker-run-action
name: Check format
with:
image: ${{ github.repository }}:${{ env.GITHUB_SHA_SHORT }}
run: mage fmt:check
- uses: addnab/docker-run-action@v2
# Run an image built by a previous step.
# https://github.com/addnab/docker-run-action
# https://github.com/marketplace/actions/docker-run-action
name: Run linter
with:
image: ${{ github.repository }}:${{ env.GITHUB_SHA_SHORT }}
run: mage fmt:lint
test:
name: test
needs: [build, check]
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Inject slug/short variables
# A GitHub Action to expose the slug values of some GitHub ENV variables
# https://github.com/rlespinasse/github-slug-action
uses: rlespinasse/[email protected]
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Get cached Docker layers
uses: actions/cache@v3
with:
path: ${{ env.BUILDX_CACHE_PATH }}
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- uses: docker/build-push-action@v3
# GitHub Action to build and push Docker images with Buildx
# https://github.com/docker/build-push-action
name: Build image
with:
push: false
target: builder
load: true
tags: ${{ github.repository }}:${{ env.GITHUB_SHA_SHORT }}
cache-from: type=local,src=${{ env.BUILDX_CACHE_PATH }}
- uses: addnab/docker-run-action@v2
# Run an image built by a previous step.
# https://github.com/addnab/docker-run-action
# https://github.com/marketplace/actions/docker-run-action
name: Run tests
with:
image: ${{ github.repository }}:${{ env.GITHUB_SHA_SHORT }}
run: mage test:run