Skip to content

Commit

Permalink
Merge pull request #98 from sbillinge/ci2
Browse files Browse the repository at this point in the history
updating gh workflow to bring it up to current patterns
  • Loading branch information
sbillinge authored Jul 29, 2023
2 parents ca62744 + ce8adae commit 0f53695
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 13 deletions.
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

0 comments on commit 0f53695

Please sign in to comment.