-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Patrick Li
committed
Jun 19, 2024
1 parent
4f0c1c8
commit 97900ce
Showing
2 changed files
with
69 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
- 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 |