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

GitHub ci #675

Closed
wants to merge 9 commits into from
Closed
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
49 changes: 49 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

defaults:
run:
shell: bash

jobs:
build-linux:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.10
- name: install clawpack
- run: |
git clone --branch=master --depth=100 --quiet git://github.com/clawpack/clawpack
cd clawpack
git submodule init
git submodule update clawutil visclaw riemann
# remove master branch of pyclaw and use branch we're testing
rm -rf pyclaw
ln -s ../ pyclaw
Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies and compile
run: |
conda env update --file environment.yml --name base
python setup.py install
- name: Test
run: |
cd pyclaw
bash ./run_tests_on_travis.sh
coveralls
50 changes: 30 additions & 20 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the workflow will run
Expand All @@ -9,28 +7,40 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]

defaults:
run:
shell: bash

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
build-linux:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
max-parallel: 5

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!

# Runs a set of commands using the runners shell
- name: Run a multi-line script
- name: Set up Python 3.10
uses: actions/setup-python@v2
- name: install clawpack
run: |
git clone --branch=master --depth=100 --quiet git://github.com/clawpack/clawpack
cd clawpack
git submodule init
git submodule update clawutil visclaw riemann
# remove master branch of pyclaw and use branch we're testing
rm -rf pyclaw
ln -s ../ pyclaw
- run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install dependencies and compile
run: |
conda env update --file environment.yml --name base
python setup.py install
- name: Test
run: |
echo Add other actions to build,
echo test, and deploy your project.
cd pyclaw
bash ./run_tests_on_travis.sh
coveralls
12 changes: 12 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: pyclaw
channels:
- conda-forge
- clawpack
dependencies:
- python >= 3.6
- numpy >= 1.9
- matplotlib >= 3.0
- scipy
- hdf5
- nose
- coverage