From 112dadfbe5b86fa039378f305772b374137aa785 Mon Sep 17 00:00:00 2001 From: daklauss Date: Mon, 15 Jul 2024 16:49:35 +0200 Subject: [PATCH] Fix CI/CD --- .github/workflows/pipeline.yml | 54 +++++++++++++++ .github/workflows/ruff.yml | 10 +++ .gitignore | 1 + environment.yml | Bin 0 -> 438 bytes tests/test_residual.py | 120 +++++++++++++++++++++++++++++++-- 5 files changed, 180 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/pipeline.yml create mode 100644 .github/workflows/ruff.yml create mode 100644 environment.yml diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml new file mode 100644 index 0000000..8178685 --- /dev/null +++ b/.github/workflows/pipeline.yml @@ -0,0 +1,54 @@ +name: pipeline + +on: + push: + branches: + - master + - dev + - add-dead-end-filtration + - test_ci + pull_request: + + +jobs: + test-job: + runs-on: ubuntu-latest + + defaults: + run: + shell: bash -l {0} + strategy: + matrix: + python-version: ["3.10", "3.11", "3.12"] + + env: + CONDA_FILE: environment.yml + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup Conda Environment + uses: conda-incubator/setup-miniconda@v3 + with: + miniforge-variant: Mambaforge + miniforge-version: latest + use-mamba: true + activate-environment: cadpythonsim + channels: conda-forge, + + - name: install conda env + run: | + mamba env update -n cadpythonsim -f ${{ env.CONDA_FILE }} + + - name: Install + run: | + python -m pip install --upgrade pip + pip install -e ./[testing] + + - name: Test + run: | + pytest diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml new file mode 100644 index 0000000..780e902 --- /dev/null +++ b/.github/workflows/ruff.yml @@ -0,0 +1,10 @@ +name: ruff + +name: Ruff +on: [ push, pull_request ] +jobs: + ruff: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: chartboost/ruff-action@v1 \ No newline at end of file diff --git a/.gitignore b/.gitignore index fa31b95..26d5f8b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ __pycache__/ debug* *.h5 *.egg-info +.vscode diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000000000000000000000000000000000000..0bd1f61436fc384c15308a1ff782f442bcde7bea GIT binary patch literal 438 zcmZXQv2MaZ5Jaa&;veXdaZi;fp{Jm?9Q(jlf;nLy5jx~bh`6;XJ>YIe!d6Q zIx1+bg&N{kQCCgsbkd+vJ?LCBunu(K1bvZT=j;Mjk(sV;sVKCEdDekC^IE=