From 8a05609b21902609c70f063ffc6e902deb930a36 Mon Sep 17 00:00:00 2001 From: samkellerhals Date: Tue, 10 Dec 2024 13:48:58 +0100 Subject: [PATCH] Fix workflows --- .github/workflows/deploy-docs.yml | 21 +++++++++++++-- .github/workflows/install-dependencies.yml | 31 ---------------------- .github/workflows/qa.yml | 25 ++++++++++++++--- 3 files changed, 41 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/install-dependencies.yml diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 50ce75b79..5874784ad 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -9,18 +9,35 @@ jobs: deploy-docs: runs-on: ubuntu-latest steps: + # Step 1: Checkout the repository - uses: actions/checkout@v3 - - name: Install Dependencies - uses: ./.github/workflows/install-dependencies.yml + # Step 2: Install system dependencies + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libboost-all-dev + + # Step 3: Set up Python + - name: Set up Python + uses: actions/setup-python@v4 with: python-version: "3.10" + # Step 4: Install all icon4py namespace packages + - name: Install all icon4py namespace packages + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install -r ./requirements-dev.txt + python -m pip list + + # Step 5: Build documentation - name: Build documentation run: | cd model/atmosphere/dycore/docs make html + # Step 6: Deploy to GitHub Pages - name: Deploy to GitHub Pages uses: peaceiris/actions-gh-pages@v4 with: diff --git a/.github/workflows/install-dependencies.yml b/.github/workflows/install-dependencies.yml deleted file mode 100644 index 60673a128..000000000 --- a/.github/workflows/install-dependencies.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Install Dependencies - -on: - workflow_call: - inputs: - python-version: - required: true - type: string - -jobs: - setup: - runs-on: ubuntu-latest - steps: - # Install system dependencies - - name: Install system dependencies - run: | - sudo apt-get update - sudo apt-get install -y libboost-all-dev - - # Set up Python - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ inputs.python-version }} - - # Install Python dependencies - - name: Install all icon4py namespace packages - run: | - python -m pip install --upgrade pip setuptools wheel - python -m pip install -r ./requirements-dev.txt - python -m pip list diff --git a/.github/workflows/qa.yml b/.github/workflows/qa.yml index fd8408ea3..a77e9576c 100644 --- a/.github/workflows/qa.yml +++ b/.github/workflows/qa.yml @@ -8,19 +8,38 @@ on: pull_request: branches: - main - types: [opened, reopened, synchronize] + types: + - opened + - reopened + - synchronize jobs: pre-commit-icon4py-model: runs-on: ubuntu-latest steps: + # Step 1: Checkout the repository - uses: actions/checkout@v3 - - name: Install Dependencies - uses: ./.github/workflows/install-dependencies.yml + # Step 2: Install system dependencies + - name: Install system dependencies + run: | + sudo apt-get update + sudo apt-get install -y libboost-all-dev + + # Step 3: Set up Python + - name: Set up Python + uses: actions/setup-python@v4 with: python-version: "3.10" + # Step 4: Install all icon4py namespace packages + - name: Install all icon4py namespace packages + run: | + python -m pip install --upgrade pip setuptools wheel + python -m pip install -r ./requirements-dev.txt + python -m pip list + + # Step 5: Run pre-commit checks - name: Run checks run: | pre-commit run