-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reuse conda build artifact in CI testing workflow
- Loading branch information
1 parent
8d715ea
commit fae8974
Showing
2 changed files
with
30 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,10 @@ jobs: | |
conda-build: | ||
name: Conda Build | ||
runs-on: ubuntu-latest | ||
env: | ||
NAME: test-${{ github.event.repository.name }} | ||
outputs: | ||
artifact-name: ${{ env.NAME }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
@@ -35,32 +39,54 @@ jobs: | |
|
||
- name: Run conda build | ||
shell: bash -el {0} | ||
run: conda build . --no-anaconda-upload | ||
id: build | ||
run: | | ||
echo "path=$(conda build . --no-anaconda-upload --output-folder=./build --output)" >> $GITHUB_OUTPUT | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.NAME }} | ||
if-no-files-found: error | ||
path: ${{ steps.build.outputs.path }} | ||
|
||
tests: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
needs: conda-build | ||
|
||
# Run the job for different versions of python | ||
strategy: | ||
matrix: | ||
python-version: ["3.10", "3.11", "3.12"] | ||
|
||
env: | ||
ARTIFACT_LOCATION: ./conda-local | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/[email protected] | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ needs.conda-build.outputs.artifact-name }} | ||
path: ${{ env.ARTIFACT_LOCATION }} | ||
|
||
- name: Setup conda environment | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniconda-version: "latest" | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install source | ||
- name: DEBUG - where are things | ||
run: ls ${{ env.ARTIFACT_LOCATION }} | ||
|
||
- name: Install conda package | ||
shell: bash -l {0} | ||
run: python -m pip install -e . | ||
run: | | ||
conda index ${{ env.ARTIFACT_LOCATION }} | ||
conda install -c file:///${{ env.ARTIFACT_LOCATION }} um2nc | ||
- name: List installed packages | ||
shell: bash -l {0} | ||
|
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 |
---|---|---|
|
@@ -11,3 +11,4 @@ dependencies: | |
- conda-build | ||
- conda-verify | ||
- versioneer | ||
- pylint |