From 5b6808b5fbad88bc800c4acbebaf8bd6293692fa Mon Sep 17 00:00:00 2001 From: mferrera Date: Mon, 24 Jun 2024 07:53:48 +0200 Subject: [PATCH] CI: move actions steps into workflows --- .github/actions/build-grid3d-maps/action.yml | 24 ----------------- .github/actions/test_setup/action.yml | 15 ----------- .github/workflows/style.yml | 11 +++++++- .github/workflows/test.yml | 28 +++++++++++++++++--- 4 files changed, 34 insertions(+), 44 deletions(-) delete mode 100644 .github/actions/build-grid3d-maps/action.yml delete mode 100644 .github/actions/test_setup/action.yml diff --git a/.github/actions/build-grid3d-maps/action.yml b/.github/actions/build-grid3d-maps/action.yml deleted file mode 100644 index 6ebfbc6..0000000 --- a/.github/actions/build-grid3d-maps/action.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Build -description: Builds grid3d-maps - -inputs: - python-version: - required: true - -runs: - using: "composite" - steps: - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: ${{ inputs.python-version }} - - - name: Install grid3d-maps - run: | - pip install -U pip - pip install . - shell: bash - - - name: List all installed packages - run: pip freeze - shell: bash diff --git a/.github/actions/test_setup/action.yml b/.github/actions/test_setup/action.yml deleted file mode 100644 index ee6f404..0000000 --- a/.github/actions/test_setup/action.yml +++ /dev/null @@ -1,15 +0,0 @@ -name: "Set up for tests" -description: "Set up the grid3d-maps test environment" - -inputs: - python-version: - required: true - -runs: - using: "composite" - steps: - - uses: "./.github/actions/build-grid3d-maps" - with: - python-version: ${{ inputs.python-version }} - - run: pip install ".[tests]" - shell: bash diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 7262a9d..32fa385 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -26,10 +26,19 @@ jobs: with: fetch-depth: 0 - - uses: "./.github/actions/test_setup" + - name: Set up Python + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install grid3d-maps + run: | + pip install -U pip + pip install ".[tests]" + + - name: List all installed packages + run: pip freeze + - name: ruff check if: ${{ always() }} run: ruff check . diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c16a078..19c4375 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,7 +18,7 @@ jobs: testing: strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] os: [ubuntu-latest] include: - os: macos-latest @@ -34,29 +34,49 @@ jobs: with: fetch-depth: 0 - - uses: "./.github/actions/test_setup" + - name: Set up Python + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install grid3d-maps + run: | + python -m pip install -U pip + pip install ".[tests]" + + - name: List all installed packages + run: pip freeze + - name: Run test run: pytest -n 4 tests/test_scripts --disable-warnings test_vs_ert: strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] os: [ubuntu-latest] runs-on: ${{ matrix.os }} + env: + MPLBACKEND: Agg steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: "./.github/actions/test_setup" + - name: Set up Python + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Install grid3d-maps + run: | + pip install -U pip + pip install ".[tests]" + + - name: List all installed packages + run: pip freeze + - name: Run test vs ERT run: | pip install ert