-
Notifications
You must be signed in to change notification settings - Fork 46
44 lines (42 loc) · 1.68 KB
/
pylint.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# SPDX-FileCopyrightText: 2009 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
on: [pull_request, push]
jobs:
pylint_job:
runs-on: ubuntu-latest
name: A job to run the pylint checks
steps:
- name: Sparse checkout
shell: bash
run: |
REPO="https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
BRANCH="${GITHUB_REF/#refs\/heads\//}"
# Following code is based on logs of actions/checkout@v, with sparseCheckout stuff inserted in the middle
echo "Syncing repository: $GITHUB_REPOSITORY"
echo "Working directory is '$(pwd)' GITHUB_WORKSPACE=$GITHUB_WORKSPACE BRANCH=$BRANCH"
git version
git init $GITHUB_WORKSPACE
git remote add origin https://github.com/$GITHUB_REPOSITORY
git config --local gc.auto 0
# Now interesting part
git config core.sparseCheckout true
# Add here contents of sparse-checkout line by line
echo ".github" >> .git/info/sparse-checkout
git -c protocol.version=2 fetch --no-tags --prune --progress --depth=10 origin +${GITHUB_SHA}:refs/remotes/origin/${BRANCH}
git checkout --progress --force -B ${BRANCH} refs/remotes/origin/${BRANCH}
id: sparse-checkout
- name: Checkout
uses: actions/checkout@v4
with:
path: "glideinwms"
id: checkout
- name: pylint action step
uses: ./.github/actions/pylint-in-docker
id: pylint
- name: Archive reports
if: always()
uses: actions/upload-artifact@v4
with:
name: reports
path: logs.tar.bz2
retention-days: 14