Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updating gh workflow to bring it up to current patterns #98

Merged
merged 5 commits into from
Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 34 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,45 @@
name: Test

on: [push, pull_request]
on:
push:
branches:
- mas
pull_request:
workflow_dispatch:

jobs:
main:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
miniconda:
name: Miniconda ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ["ubuntu-latest"]
steps:
- uses: actions/checkout@v2

- uses: conda-incubator/setup-miniconda@v2
- name: check out xpdtools
uses: actions/checkout@v3
with:
repository: xpdacq/xpdtools
# for bookkeeping have diffpy.snmf at the same level as everything else in the
# directory tree
path: .

- name: initialize miniconda
# this uses a marketplace action that sets up miniconda in a way that makes
# it easier to use. I tried setting it up without this and it was a pain
uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
channels: nsls2forge,conda-forge
# environment.yml file is needed by this action. Because I don't want
# maintain this but rather maintain the requirements files it just has
# basic things in it like conda and pip
auto-update-conda: true
environment-file: ./environment.yml
auto-activate-base: false

- name: install requirements
run: >-
conda install --file requirements.txt --file requirements-dev.txt
conda install --file requirements.txt
conda install --file requirements-dev.txt

- name: install the package
run: python -m pip install . --no-deps
Expand All @@ -34,3 +54,6 @@ jobs:

- name: check the code style
run: flake8

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
6 changes: 6 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: xpdtools
channels:
- conda-forge
dependencies:
- python=3
- pip
3 changes: 1 addition & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
flake8
pytest==5.4
xpdsim
pytest
nose
codecov
coverage
Expand Down
Loading