From ff8597d60fc391702bc26eeeddc50f8e71b8a8ec Mon Sep 17 00:00:00 2001 From: Jo Basevi Date: Thu, 16 May 2024 13:46:09 +1000 Subject: [PATCH] Add CI workflow to run tests --- .github/workflows/CI.yml | 26 ++++++++++++++++++++++++++ pyproject.toml | 5 ++--- 2 files changed, 28 insertions(+), 3 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..ae9a590 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,26 @@ +name: CI + +on: + pull_request: + branches: + - 'main' + +jobs: + tests: + name: Tests + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: 3.11 + cache: pip + + - name: Install model_config_tests + run: pip install -e '.[test]' + + - name: Run tests + run: pytest -s tests diff --git a/pyproject.toml b/pyproject.toml index 0779e9d..c9a7b96 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,18 +2,17 @@ build-backend = "setuptools.build_meta" requires = [ "setuptools >= 61.0.0", - "versioneer[toml]" ] [project] name = "model-config-tests" version = "0.0.1" authors = [ - { name = "ACCESS-NRI", email = "access.nri@anu.edu.au" }, + { name = "ACCESS-NRI" }, ] description = "Test for ACCESS model (payu) configurations" readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" license = { text = "Apache-2.0" } classifiers = [ "Programming Language :: Python :: 3",