From 06a82c6ba456e36e7890d64819d72a6b8f2a36b9 Mon Sep 17 00:00:00 2001 From: DahnJ Date: Sun, 2 Mar 2025 01:36:03 +0100 Subject: [PATCH] ci: Create basic CI --- .github/workflows/ci.yml | 35 +++++++++++++++++++++++++++++++++++ environment-dev.yml | 1 + 2 files changed, 36 insertions(+) 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..a4e2f59 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + push: + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Conda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + activate-environment: myenv + environment-file: environment.yml + + - name: Install development dependencies + shell: bash -l {0} + run: | + conda env update --file environment-dev.yml + + - name: ruff check + shell: bash -l {0} + run: | + ruff check . + + - name: pytest + shell: bash -l {0} + run: | + pytest tests/ diff --git a/environment-dev.yml b/environment-dev.yml index 8f9053e..9470b65 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -2,5 +2,6 @@ channels: - conda-forge dependencies: # Test + - ruff - pytest - pytest-cov