Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up CI/CD workflows #1278

Merged
merged 19 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/actions/install-parcels/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Setup Anaconda and install parcels
description: >
In-repo composite action to setup Anaconda and install parcels. Installation of parcels relies on
`setup.py` file being available in the root. For general setup of Anaconda environments, just use
the `conda-incubator/setup-miniconda` action (setting C variables as required)
inputs:
environment-file:
description: "Anaconda environment file"
required: true
environment-name:
description: "Anaconda environment name"
required: true
runs:
using: "composite"
steps:
- name: Configure pagefile # Windows compatability fix as per PR #1279
if: ${{ runner.os == 'Windows' }}
uses: al-cheb/configure-pagefile-action@v1.3
with:
minimum-size: 8GB
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v2.2.0
with:
miniconda-version: "latest"
activate-environment: ${{ inputs.environment-name }} # Needs to be the same as listed in the env file
environment-file: ${{ inputs.environment-file }}
auto-activate-base: false
auto-update-conda: true
- run: conda info
shell: bash -el {0}
- name: Install parcels
run: python setup.py install
shell: bash -el {0}
- name: Set env variables for macos
run: |
if [[ "${{ runner.os }}" == macOS ]]; then
echo "Setting CONDA_BUILD_SYSROOT and C_INCLUDE_PATH for macos"
echo "CONDA_BUILD_SYSROOT=/" >> $GITHUB_ENV
echo "C_INCLUDE_PATH=$C_INCLUDE_PATH:/Applications/Xcode.app/Contents//Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/" >> $GITHUB_ENV
echo "CC=gcc" >> $GITHUB_ENV
else
echo "Platform not macos."
fi
shell: bash
106 changes: 0 additions & 106 deletions .github/scripts/install_miniconda.ps1

This file was deleted.

8 changes: 0 additions & 8 deletions .github/scripts/linux_install.sh

This file was deleted.

11 changes: 0 additions & 11 deletions .github/scripts/linux_integrationtest.sh

This file was deleted.

10 changes: 0 additions & 10 deletions .github/scripts/linux_unittest.sh

This file was deleted.

8 changes: 0 additions & 8 deletions .github/scripts/osx_integrationtest.sh

This file was deleted.

7 changes: 0 additions & 7 deletions .github/scripts/osx_unittest.sh

This file was deleted.

5 changes: 0 additions & 5 deletions .github/scripts/windows_install.bat

This file was deleted.

4 changes: 0 additions & 4 deletions .github/scripts/windows_integrationtest.bat

This file was deleted.

3 changes: 0 additions & 3 deletions .github/scripts/windows_unittest.bat

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/ci-workflow-integrationtests.yml

This file was deleted.

65 changes: 0 additions & 65 deletions .github/workflows/ci-workflow-unittests.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: integration-tests
on:
push:
branches:
- "master"
- "test-me/*"
pull_request:
branches:
- "*"
schedule:
- cron: "0 7 * * 1" # Run every Monday at 7:00 UTC

defaults:
run:
shell: bash -el {0}

jobs:
integration-test:
if: github.event.pull_request.draft == false
name: ${{ matrix.os }} integration tests
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [macos, ubuntu, windows]
include:
- os: macos
os-short: osx
- os: ubuntu
os-short: linux
- os: windows
os-short: win
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Miniconda and parcels
uses: ./.github/actions/install-parcels
with:
environment-file: environment_py3_${{ matrix.os-short }}.yml
environment-name: py3_parcels
- name: Integration test
run: |
parcels_get_examples examples
pytest -v -s --nbval-lax -k "not documentation" --html="${{ matrix.os }}_integration_test_report.html" --self-contained-html examples
- name: Upload test results
if: ${{ always() }} # Always run this step, even if tests fail
uses: actions/upload-artifact@v3.1.2
with:
name: Integration test report
path: ${{ matrix.os }}_integration_test_report.html

Loading