Skip to content

Commit

Permalink
use environment.yml to install firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed May 13, 2024
1 parent f39f3c1 commit b4f46c1
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 93 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: build

on:
release:
types: [ released ]
pull_request:
workflow_dispatch:

defaults:
run:
shell: micromamba-shell {0}

jobs:
build:
uses: OpenAstronomy/github-actions-workflows/.github/workflows/publish_pure_python.yml@v1
with:
upload_to_pypi: false
freeze:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.11"
fail-fast: false
name: freeze versions (Python ${{ matrix.python-version }})
steps:
- uses: actions/checkout@v4
- uses: mamba-org/setup-micromamba@v1
with:
environment-name: jwql-${{ runner.os }}-py${{ matrix.python-version }}
environment-file: environment.yaml
create-args: >-
python=${{ matrix.python-version }}
init-shell: none
generate-run-shell: true
- run: pip install .
- run: pip list
- id: version
uses: mtkennerly/dunamai-action@v1
- run: echo "filename=jwql_${{ matrix.python-version }}_${{ steps.version.outputs.version }}.txt" >> $GITHUB_OUTPUT
id: output
- run: pip freeze > ${{ steps.output.outputs.filename }}
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.output.outputs.filename }}
path: ${{ steps.output.outputs.filename }}
- if: (github.event_name == 'release' && github.event.action == 'published')
uses: svenstaro/upload-release-action@v2
with:
file: ${{ steps.output.outputs.filename }}


37 changes: 18 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash -l {0}

jobs:
check:
runs-on: ubuntu-latest
Expand All @@ -25,30 +21,33 @@ jobs:
name: test (Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 5
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.10"]

os: [ "ubuntu-latest", "macos-latest" ]
python-version: [ "3.11" ]
fail-fast: false
env:
PYTHONUNBUFFERED: 1
defaults:
run:
shell: micromamba-shell {0}
steps:
- uses: actions/checkout@v4

- uses: mamba-org/setup-micromamba@v1
with:
environment-file: ./environment_python_${{ matrix.python-version }}.yml
environment-name: jwql-${{ runner.os }}-py${{ matrix.python-version }}
environment-file: environment.yml
create-args: >-
python=${{ matrix.python-version }}
cache-environment: true
cache-downloads: true
init-shell: bash

- run: pip install -e .[test]

- run: micromamba env export

- uses: supercharge/[email protected]
init-shell: none
generate-run-shell: true

- if: runner.os == 'Linux'
uses: supercharge/[email protected]
with:
redis-version: 5.0
if: runner.os == 'Linux'

- run: python -c "import jwql; print('Version ' + jwql.__version__); print('Path ' + jwql.__path__[0])"

Expand Down
3 changes: 3 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dependencies:
- firefox
- python
74 changes: 0 additions & 74 deletions environment_python_3.10.yml

This file was deleted.

0 comments on commit b4f46c1

Please sign in to comment.