From 97900ced4430bffb9c90071be3913c4ade710098 Mon Sep 17 00:00:00 2001 From: Patrick Li Date: Wed, 19 Jun 2024 14:24:32 -0400 Subject: [PATCH] debug --- .github/workflows/continous-integration.yml | 66 +++++++++++---------- .github/workflows/download-artifact.yml | 48 +++++++++++---- 2 files changed, 69 insertions(+), 45 deletions(-) diff --git a/.github/workflows/continous-integration.yml b/.github/workflows/continous-integration.yml index f57ca91..9fe43cc 100644 --- a/.github/workflows/continous-integration.yml +++ b/.github/workflows/continous-integration.yml @@ -17,37 +17,39 @@ permissions: jobs: build: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Miniconda - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - miniconda-version: "latest" - channels: anaconda - channel-priority: true - - - name: Create conda environment - run: conda env create -f devtools/conda-envs/environment.yml - - - name: Activate conda environment - shell: bash -l {0} - run: conda activate autosolvate - - - name: Install additional dependencies if needed - run: conda install --yes flake8 pytest - - - name: Test with pytest - run: - mkdir -p test-reports - conda run -n autosolvate pytest --junitxml=test-reports/results.xml - - - name: Upload Test Reports - uses: actions/upload-artifact@v3 - with: - name: test-reports - path: test-reports/results.xml + - uses: actions/checkout@v3 + + - name: Set up Miniconda + uses: conda-incubator/setup-miniconda@v2 + with: + auto-update-conda: true + miniconda-version: "latest" + channels: anaconda + channel-priority: true + + - name: Create conda environment + run: conda env create -f devtools/conda-envs/environment.yml + + - name: Activate conda environment + shell: bash -l {0} + run: conda activate autosolvate + + - name: Install additional dependencies if needed + run: conda install --yes flake8 pytest + + - name: Create test reports directory + run: mkdir -p test-reports + + - name: Test with pytest + run: conda run -n autosolvate pytest --junitxml=test-reports/results.xml + + - name: Check if pytest results file exists + run: ls -la test-reports/ + + - name: Upload Test Reports + uses: actions/upload-artifact@v3 + with: + name: test-reports + path: test-reports/results.xml \ No newline at end of file diff --git a/.github/workflows/download-artifact.yml b/.github/workflows/download-artifact.yml index 46c25cc..d6558e6 100644 --- a/.github/workflows/download-artifact.yml +++ b/.github/workflows/download-artifact.yml @@ -1,21 +1,43 @@ -name: Download Artifacts +name: Download Test Reports -on: workflow_dispatch +on: [push, pull_request] + +permissions: + contents: read jobs: - fetch-reports: - runs-on: ubuntu-latest + build: + + runs-on: macos-latest steps: - - name: Checkout code - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Download Test Reports - uses: actions/download-artifact@v3 + - name: Set up Miniconda + uses: conda-incubator/setup-miniconda@v2 with: - name: test-reports - path: downloaded-reports + auto-update-conda: true + miniconda-version: "latest" + channels: anaconda + channel-priority: true + + - name: Create conda environment + run: conda env create -f devtools/conda-envs/environment.yml + + - name: Activate conda environment + shell: bash -l {0} + run: conda activate autosolvate - - name: Display Report - run: | - cat downloaded-reports/results.xml \ No newline at end of file + - name: Install additional dependencies if needed + run: conda install --yes flake8 pytest + + - name: Test with pytest + run: + mkdir -p test-reports + conda run -n autosolvate pytest --junitxml=test-reports/results.xml + + - name: Upload Test Reports + uses: actions/upload-artifact@v3 + with: + name: test-reports + path: test-reports/results.xml \ No newline at end of file