Skip to content

Commit

Permalink
Update build-and-test job
Browse files Browse the repository at this point in the history
Use mamba and don't duplicate builds on local PRs.
  • Loading branch information
mdpiper committed Aug 26, 2021
1 parent e3c21dd commit 75b61b2
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions .github/workflows/build-test-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ on: [push, pull_request]

jobs:
build-and-test:
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch. Without this if check, checks are duplicated since
# internal PRs match both the push and pull_request events.
if:
github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
github.repository

runs-on: ${{ matrix.os }}

defaults:
Expand All @@ -26,18 +33,21 @@ jobs:
channel-priority: true

- name: Show conda installation info
run: conda info

- name: Install dependencies
run: |
conda install --file=requirements.txt -c conda-forge
conda info
conda list
- name: Install requirements
run: |
conda install mamba
mamba install --file=requirements.txt
mamba list
- name: Build and install package
run: pip install .
run: pip install -e .

- name: Install testing dependencies
run: conda install --file=requirements-testing.txt -c conda-forge
run: mamba install --file=requirements-testing.txt

- name: Test
run: |
Expand Down

0 comments on commit 75b61b2

Please sign in to comment.