diff --git a/.github/license-check/config.json b/.github/license-check/config.json new file mode 100644 index 0000000000..0625a49e0d --- /dev/null +++ b/.github/license-check/config.json @@ -0,0 +1,8 @@ +[ + { + "include": [ + "**/*.rs" + ], + "license": "./.github/license-check/headers/HEADER-GNUv3" + } +] diff --git a/HEADER-GNUv3 b/.github/license-check/headers/HEADER-GNUv3 similarity index 99% rename from HEADER-GNUv3 rename to .github/license-check/headers/HEADER-GNUv3 index bb0211d5a3..bbb0184fee 100644 --- a/HEADER-GNUv3 +++ b/.github/license-check/headers/HEADER-GNUv3 @@ -15,4 +15,3 @@ // You should have received a copy of the GNU General Public License // along with Astar. If not, see . - diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 41a27d65c0..5d9715cc63 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -2,6 +2,7 @@ name: Static Analysis on: [push, workflow_dispatch] jobs: fmt: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - name: Checkout the source code @@ -29,6 +30,7 @@ jobs: taplo fmt --check clippy: + if: github.event.pull_request.draft == false runs-on: ubuntu-latest steps: - name: Checkout the source code @@ -47,3 +49,17 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features -- -D warnings + + check-license: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + steps: + - name: Checkout the source code + uses: actions/checkout@v3 + + - name: Check license + uses: viperproject/check-license-header@v2 + with: + path: ./ + config: ./.github/license-check/config.json + strict: false