From 2fd605ac7d106494a45c708f523e5ee1b9369b72 Mon Sep 17 00:00:00 2001 From: voetberg Date: Tue, 30 May 2023 18:58:19 +0000 Subject: [PATCH 1/2] adding auto-test --- .github/workflows/test_push.yaml | 34 ++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/test_push.yaml diff --git a/.github/workflows/test_push.yaml b/.github/workflows/test_push.yaml new file mode 100644 index 0000000..15b0c0a --- /dev/null +++ b/.github/workflows/test_push.yaml @@ -0,0 +1,34 @@ + +name: test-bench + +on: push + +jobs: + test: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.10 + uses: actions/setup-python@v2 + with: + python-version: "3.10" + - name: Install poetry ${{ matrix.poetry-version }} + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' + run: | + python -m ensurepip + python -m pip install --upgrade pip + python -m pip install poetry==1.3.2 + + - name: View poetry --help + run: poetry --help + + - name: Install dependencies + shell: bash + run: python -m poetry install + + - name: Test with pytest + run: | + python3 -m poetry run pytest --cov \ No newline at end of file From 22c62e616ff7a17124c6c27693b8cbf0bc774640 Mon Sep 17 00:00:00 2001 From: voetberg Date: Fri, 9 Jun 2023 12:45:18 -0500 Subject: [PATCH 2/2] using conda --- .github/workflows/test_push.yaml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test_push.yaml b/.github/workflows/test_push.yaml index 15b0c0a..075fd07 100644 --- a/.github/workflows/test_push.yaml +++ b/.github/workflows/test_push.yaml @@ -14,21 +14,19 @@ jobs: uses: actions/setup-python@v2 with: python-version: "3.10" - - name: Install poetry ${{ matrix.poetry-version }} + - name: Install conda env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' run: | python -m ensurepip - python -m pip install --upgrade pip - python -m pip install poetry==1.3.2 + $CONDA/bin/conda env create -f conda-env.yml - - name: View poetry --help - run: poetry --help + - name: Activate + run: $CONDA/bin/conda activate deepskies-simcmb - - name: Install dependencies - shell: bash - run: python -m poetry install + - name: Install package + run: python3 -m pip install . - name: Test with pytest run: | - python3 -m poetry run pytest --cov \ No newline at end of file + python3 -m pytest \ No newline at end of file