Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add serverless verify to github action #558

Merged
merged 1 commit into from
Jan 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/serverless-verify.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Serverless verify

on:
push:
branches: [ "main", "release-*" ]
pull_request:
paths-ignore:
- 'docs/**'
- 'examples/**'
types:
- opened
- reopened
- synchronize
- ready_for_review
- converted_to_draft

jobs:
#pre-serverless-controller-lint
serverless-lint:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: libgit2 installation
run: git clone https://github.com/libgit2/libgit2.git && cd libgit2 && git checkout v1.5.2 && cmake . && sudo make install
- uses: golangci/golangci-lint-action@v3
with:
version: latest
working-directory: 'components/serverless'

#pre-serverless-controller-unit-test
serverless-unit-tests:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- name: install libssh2
run: sudo apt update && sudo apt install libssh2-1-dev -y
- name: libgit2 installation
run: |
git clone https://github.com/libgit2/libgit2.git
cd libgit2
git checkout v1.5.2
cmake . -DBUILD_TESTS=OFF -DBUILD_CLI=OFF -DUSE_SSH=ON
sudo make install
sudo ldconfig
- uses: actions/checkout@v4
- name: run test
run: make -C components/serverless test