Skip to content

add golangci-lint

add golangci-lint #535

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- master
paths:
- "**.go"
- "**/go.mod"
- "src/**"
- "_ertgo"
pull_request:
paths:
- "**.go"
- "**/go.mod"
- "src/**"
- "_ertgo"
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/edgelesssys/edgelessrt-dev:ci
steps:
- name: Check out code
uses: actions/checkout@v2
with:
path: ego
submodules: recursive
- name: Setup
run: mkdir build
- name: Build
run: |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DTIDY=ON ../ego
make -j`nproc`
working-directory: build
- name: Test
run: OE_SIMULATION=1 ctest --output-on-failure
working-directory: build
- name: CPack
run: cpack -G DEB
working-directory: build
- name: Build artifact
uses: actions/upload-artifact@v2
with:
name: ego
path: build/*.deb
- name: Deploy ego-dev:nightly
if: github.ref == 'refs/heads/master' &&
github.event_name == 'push'
run: |
curl -X POST -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.CI_GITHUB_REPOSITORY }}" \
-d '{"event_type": "docker-build",
"client_payload":{"repository":"ego",
"sign":"nightly",
"imagename":"ego-dev",
"tag":"nightly",
"file": "dockerfiles/Dockerfile",
"args": "--build-arg erttag=master --build-arg egotag=master",
"target":"dev"}}' \
https://api.github.com/repos/edgelesssys/deployment/dispatches
- name: Deploy ego-deploy:nightly
if: github.ref == 'refs/heads/master' &&
github.event_name == 'push'
run: |
curl -X POST -H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.CI_GITHUB_REPOSITORY }}" \
-d '{"event_type": "docker-build",
"client_payload":{"repository":"ego",
"sign":"nightly",
"imagename":"ego-deploy",
"tag":"nightly",
"file": "dockerfiles/Dockerfile",
"args": "--build-arg erttag=master --build-arg egotag=master",
"target":"deploy"}}' \
https://api.github.com/repos/edgelesssys/deployment/dispatches