Users mapping #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install clang-format | |
sudo pip3 install cpplint flawfinder | |
- name: Run formatter | |
run: clang-format --style Google --dry-run --Werror src/*.{cpp,hpp} src/include/*.{c,h}* test/*.cpp | |
- name: Run cpplint | |
run: cpplint src/* src/include/* test/*.cpp | |
- name: Run flawfinder | |
run: flawfinder --error-level 1 src/*.{cpp,hpp} src/include/*.{c,h}* test/*.cpp | |
build: | |
runs-on: ubuntu-latest | |
needs: [lint] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libldap2-dev libpam0g-dev libcurl4-openssl-dev | |
- name: Build PAM module | |
run: make | |
- name: Run unit tests | |
run: | | |
cd test | |
wget https://github.com/google/googletest/archive/refs/tags/release-1.10.0.tar.gz | |
tar -xf release-1.10.0.tar.gz | |
./mock_server.py & | |
make | |
release: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: release-please-action | |
uses: google-github-actions/release-please-action@v3 | |
with: | |
package-name: pam_oauth2_device | |
release-type: simple | |
bump-minor-pre-major: true |