Skip to content

Commit

Permalink
Merge pull request #1068 from cta-observatory/set-mamba-ci
Browse files Browse the repository at this point in the history
Change conda installation to mamba setup in CI workflow
  • Loading branch information
rlopezcoto authored Jan 24, 2023
2 parents e75028a + a08afa5 commit ca9caa4
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
pyflakes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand All @@ -45,25 +45,21 @@ jobs:
ctapipe-version: [v0.12.0]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Prepare conda installation
- name: Prepare mamba installation
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
# fix mamba error that the directory does not exist
mkdir -p ~/conda_pkgs_dir/cache
# setup correct python version
sed -i -e "s/- python=.*/- python=$PYTHON_VERSION/g" environment.yml
- name: Conda setup
uses: conda-incubator/setup-miniconda@v2
- name: Mamba setup
uses: mamba-org/provision-with-micromamba@v14
with:
mamba-version: "*"
auto-update-conda: true
activate-environment: "lst-dev"
environment-name: "lst-dev"
environment-file: environment.yml

- name: Install dependencies
Expand Down Expand Up @@ -102,12 +98,12 @@ jobs:
needs: pyflakes
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8

Expand Down

0 comments on commit ca9caa4

Please sign in to comment.