Skip to content

Commit

Permalink
ci: use gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
trichter committed Feb 27, 2023
1 parent 4a463e3 commit e6d3f6e
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 40 deletions.
13 changes: 13 additions & 0 deletions .github/test_conda_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: test
channels:
- conda-forge
dependencies:
- obspy
- coverage
- h5py
- tqdm
- pyfftw
- pip
- pip:
- obspyh5

50 changes: 50 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: tests
on:
push:
pull_request:
branches:
# only branches from forks which have the form 'user:branch-name'
- '**:**'
jobs:
run_tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python: [3.9, "3.10"]
flags: ["-v --full -n 2", "-v -n 1"]
include:
- os: macos-latest
python: "3.10"
flags: "-v -n 2"
- os: windows-latest
python: "3.10"
flags: "-v -n 2"
runs-on: ${{ matrix.os }}
env:
flags: ${{ matrix.flags }}
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
- name: Setup conda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python }}
environment-file: .github/test_conda_env.yml
- name: print conda environment info
run: |
conda info -a
conda list
- name: install package
run: |
pip install -v --no-deps .
- name: run test suite
run: |
mkdir empty; cd empty; cp ../.coveragerc ./
coverage run -m yam.tests $flags
coverage combine
coverage xml -o ../coverage.xml
- name: upload coverage
uses: codecov/codecov-action@v3
40 changes: 0 additions & 40 deletions .travis.yml

This file was deleted.

0 comments on commit e6d3f6e

Please sign in to comment.