Skip to content

Commit

Permalink
Add build github action
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed May 5, 2022
1 parent af428cd commit 7233cf5
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: build_and_test

on:
push:
branches:
- main
pull_request:

jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
with:
python-version: 3.8
channels: conda-forge,defaults
channel-priority: strict
show-channel-urls: true

- name: Install conda packages used by this package
shell: bash -l {0}
run: |
conda install mamba
mamba install -y -q scons eups compilers
# We have two cores so we can speed up the testing with xdist
- name: Install pytest packages
shell: bash -l {0}
run: |
mamba install -y -q \
flake8 \
pytest pytest-flake8 pytest-xdist pytest-openfiles pytest-cov pytest-session2file
- name: List installed packages
shell: bash -l {0}
run: |
conda list
pip list -v
- name: Build and test
shell: bash -l {0}
run: |
setup -k -r .
scons -j2
- name: Upload coverage to codecov
uses: codecov/codecov-action@v2
with:
file: tests/.tests/pytest-sconsUtils.xml-cov-sconsUtils.xml

0 comments on commit 7233cf5

Please sign in to comment.