Skip to content

Fix copyrights

Fix copyrights #150

# This file is part of pydidas.
#
# Copyright 2024, Helmholtz-Zentrum Hereon
# SPDX-License-Identifier: CC-BY-4.0
#
# This workflow will check the formatting of the newly pushed commits
# to verify that all files are corretly formatted.
name: Check formatting, linting, and copyrights
on:
pull_request:
branches: [ "master" ]
jobs:
check_ruff_formatting:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ruff
- name: Code formatting with ruff
run: |
python -m ruff format . --check
check_ruff_linting:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ruff
- name: Lint with ruff
run: |
python -m ruff check .
check_reuse:
runs-on: ubuntu-latest
steps:
- name: Reuse check
uses: fsfe/reuse-action@v2
check_copyrights:
runs-on: ubuntu-latest
steps:
- name: Check out source repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install GitPython
- name: Check copyrights
run: |
python formatter.py --copyright --check --git-only