From 839559770cf44403a25255988a146bdd62501258 Mon Sep 17 00:00:00 2001 From: Francesco Ballarin Date: Sat, 25 Nov 2023 12:00:56 +0100 Subject: [PATCH] Add yamllint on CI --- .github/workflows/ci.yml | 36 +++++++++++++++++++++++++++++ .github/workflows/open_in_cloud.yml | 10 ++++---- 2 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..593af2f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: "CI" + +on: + push: + branches: + - "**" + - "!gh-pages" + - "!open-in-colab-rbnicsx" + pull_request: + branches: + - main + schedule: + - cron: "0 2 * * SUN" + workflow_dispatch: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + python3 -m pip -q install yamllint + - name: Run yamllint + run: | + python3 -m yamllint -d "{extends: default, rules: {document-start: {present: false}, line-length: {max: 999}, truthy: {check-keys: false}}}" . + + warn: + runs-on: ubuntu-latest + if: github.repository == 'RBniCS/rbnicsproject.org' && github.ref == 'refs/heads/main' && github.event_name == 'schedule' + steps: + - name: Warn if scheduled workflow is about to be disabled + uses: fem-on-colab/warn-workflow-about-to-be-disabled-action@main + with: + workflow-filename: website.yml + days-elapsed: 50 diff --git a/.github/workflows/open_in_cloud.yml b/.github/workflows/open_in_cloud.yml index 112f907..36e51b7 100644 --- a/.github/workflows/open_in_cloud.yml +++ b/.github/workflows/open_in_cloud.yml @@ -101,8 +101,8 @@ jobs: runs-on: ubuntu-latest if: github.repository == 'RBniCS/rbnicsproject.org' && github.ref == 'refs/heads/main' && github.event_name == 'schedule' steps: - - name: Warn if scheduled workflow is about to be disabled - uses: fem-on-colab/warn-workflow-about-to-be-disabled-action@main - with: - workflow-filename: open_in_cloud.yml - days-elapsed: 50 + - name: Warn if scheduled workflow is about to be disabled + uses: fem-on-colab/warn-workflow-about-to-be-disabled-action@main + with: + workflow-filename: open_in_cloud.yml + days-elapsed: 50