From 53682d4aa6b8e55ba56cb728bd1c79943bf0dd62 Mon Sep 17 00:00:00 2001 From: Philipp Wendler Date: Tue, 31 Oct 2023 10:44:01 +0100 Subject: [PATCH] Initial set of config for GitHub actions with Black, Reuse, and Ruff Unfortunately, GitLab CI still does not work for GitHub PRs from forks, and Travis has become unusable. So reviewing PRs from forks is tedious because these checks have to be executed manually. We could use AppVeyor, which we already use for tests on Windows, but GitHub Actions are more common and likely the UI is better. So let's try this. --- .github/workflows/black.yml | 20 ++++++++++++++++++++ .github/workflows/reuse.yml | 17 +++++++++++++++++ .github/workflows/ruff.yml | 17 +++++++++++++++++ 3 files changed, 54 insertions(+) create mode 100644 .github/workflows/black.yml create mode 100644 .github/workflows/reuse.yml create mode 100644 .github/workflows/ruff.yml diff --git a/.github/workflows/black.yml b/.github/workflows/black.yml new file mode 100644 index 000000000..6fe7c56b7 --- /dev/null +++ b/.github/workflows/black.yml @@ -0,0 +1,20 @@ +# This file is part of BenchExec, a framework for reliable benchmarking: +# https://github.com/sosy-lab/benchexec +# +# SPDX-FileCopyrightText: 2023 Dirk Beyer +# +# SPDX-License-Identifier: Apache-2.0 + +name: Check code format + +on: [push, pull_request] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: psf/black@stable + with: + options: "--check --diff" + version: "<2024" diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml new file mode 100644 index 000000000..b2093640e --- /dev/null +++ b/.github/workflows/reuse.yml @@ -0,0 +1,17 @@ +# This file is part of BenchExec, a framework for reliable benchmarking: +# https://github.com/sosy-lab/benchexec +# +# SPDX-FileCopyrightText: 2023 Dirk Beyer +# +# SPDX-License-Identifier: Apache-2.0 + +name: REUSE Compliance Check + +on: [push, pull_request] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: fsfe/reuse-action@v1 diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 000000000..d65cae890 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,17 @@ +# This file is part of BenchExec, a framework for reliable benchmarking: +# https://github.com/sosy-lab/benchexec +# +# SPDX-FileCopyrightText: 2023 Dirk Beyer +# +# SPDX-License-Identifier: Apache-2.0 + +name: Ruff + +on: [push, pull_request] + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: chartboost/ruff-action@v1