Skip to content

Commit

Permalink
See issue #30: Added linter to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshjoshi committed Jun 12, 2024
1 parent 24d8feb commit 540d682
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/pants.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2020 Pants project contributors.
# Licensed under the Apache License, Version 2.0 (see LICENSE).

# See https://pants.readme.io/docs/using-pants-in-ci for tips on how to set up your CI with Pants.

name: Pants linting

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
env:
PANTS_CONFIG_FILES: pants.ci.toml
strategy:
matrix:
python-version: [3.9]

steps:
- uses: actions/checkout@v4

- uses: pantsbuild/actions/init-pants@v9
with:
# cache0 makes it easy to bust the cache if needed
gha-cache-key: cache0-py${{ matrix.python_version }}
named-caches-hash: ${{ hashFiles('build-support/lockfiles/*.lock') }}

- name: Bootstrap Pants
run: |
pants --version
- name: Lint
run: |
pants update-build-files --check lint ::
# - name: Upload pants log
# uses: actions/upload-artifact@v2
# with:
# name: pants-log
# path: .pants.d/pants.log
# if: always() # We want the log even on failures.
2 changes: 1 addition & 1 deletion gcf-cythonize/BUILD.pants
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
file(
name="entrypoint",
source="docker-entrypoint.sh",
source="docker-entrypoint.sh",
)

docker_image(
Expand Down
2 changes: 1 addition & 1 deletion u-boot-builder/BUILD.pants
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
file(
name="entrypoint",
source="docker-entrypoint.sh",
source="docker-entrypoint.sh",
)

docker_image(
Expand Down

0 comments on commit 540d682

Please sign in to comment.