Skip to content

Commit

Permalink
Add dist
Browse files Browse the repository at this point in the history
  • Loading branch information
noemifrisina committed Aug 30, 2023
1 parent 0dbd929 commit f50c812
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
38 changes: 37 additions & 1 deletion .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,4 +80,40 @@ jobs:
uses: codecov/codecov-action@v3
with:
name: ${{ matrix.python }}/${{ matrix.os }}
files: cov.xml
files: cov.xml

dist:
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: "ubuntu-latest"

steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Need this to get version number from last tag
fetch-depth: 0

- name: Build sdist and wheel
run: |
export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) && \
pipx run build
- name: Upload sdist and wheel as artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: dist

- name: Check for packaging errors
run: pipx run twine check --strict dist/*

- name: Install python packages
uses: ./.github/actions/install_requirements
with:
python_version: '3.10'
requirements_file: requirements.txt
install_options: dist/*.whl

- name: Test module --version works using the installed wheel
# If more than one module in src/ replace with module name to test
run: python -m nexgen --version
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ hdf5plugin==4.1.3
numpy==1.24.3
pint==0.22
scanspec==0.6.1
pydantic==1.10.12
pydantic==1.10.12
importlib_resources==6.0.1

0 comments on commit f50c812

Please sign in to comment.