-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Apply the new workflow * remove prerelease from docs workflow * rename to main
- Loading branch information
Showing
4 changed files
with
110 additions
and
74 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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Gather coverage report and upload to codecov | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
release: | ||
types: | ||
- prereleased | ||
- published | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
jobs: | ||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out diffpy.pdfgui | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize miniconda | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
activate-environment: test | ||
auto-update-conda: true | ||
environment-file: environment.yml | ||
auto-activate-base: false | ||
|
||
- name: Conda config | ||
run: >- | ||
conda config --set always_yes yes | ||
--set changeps1 no | ||
- name: Install diffpy.pdfgui and requirements | ||
run: | | ||
conda install --file requirements/run.txt | ||
conda install --file requirements/test.txt | ||
python -m pip install -r requirements/pip.txt | ||
python -m pip install . --no-deps | ||
- name: Install Xvfb | ||
run: sudo apt-get install -y xvfb | ||
|
||
- name: Start Xvfb | ||
run: | | ||
export DISPLAY=:99 | ||
Xvfb :99 -screen 0 1024x768x16 & | ||
- name: Validate diffpy.pdfgui | ||
run: | | ||
export DISPLAY=:99 | ||
coverage run -m pytest -vv -s | ||
coverage report -m | ||
codecov | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
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
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
This file was deleted.
Oops, something went wrong.