1
0
mirror of https://github.com/minio/minio-cpp.git synced 2025-04-18 08:24:00 +03:00

Use ubuntu-24.04 for linter (#142)

Signed-off-by: Bala.FA <bala@minio.io>
This commit is contained in:
Bala FA 2024-05-15 13:46:07 +05:30 committed by GitHub
parent 046a41ef15
commit e9e63da5a1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 47 additions and 33 deletions

View File

@ -16,39 +16,6 @@ permissions:
contents: read
jobs:
coding-style:
name: "Coding Style & Version Check"
runs-on: ubuntu-latest
steps:
- name: Checkout minio-cpp
uses: actions/checkout@v4
with:
path: "minio-cpp"
- name: "Python"
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies if Ubuntu
run: |
wget --quiet -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main' | sudo tee -a /etc/apt/sources.list
sudo apt-get -qy update
sudo apt-get -qy install clang-format-18
clang-format-18 --version
- name: Version Check
shell: bash
working-directory: minio-cpp
run: python check-version.py
- name: Coding Style Check
shell: bash
working-directory: minio-cpp
run: CLANG_FORMAT=clang-format-18 ./check-style.sh
build:
strategy:
fail-fast: false

47
.github/workflows/linters.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: Linters
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# This ensures that previous jobs for the PR are canceled when the PR is
# updated.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
coding-style:
name: "Coding Style & Version Check"
runs-on: ubuntu-24.04
steps:
- name: Checkout minio-cpp
uses: actions/checkout@v4
with:
path: "minio-cpp"
- name: "Python"
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install dependencies
run: |
sudo apt -qy install clang-format-18
clang-format-18 --version
- name: Version Check
shell: bash
working-directory: minio-cpp
run: python check-version.py
- name: Coding Style Check
shell: bash
working-directory: minio-cpp
run: CLANG_FORMAT=clang-format-18 ./check-style.sh