-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #458 from bouthilx/test-github-actions
Migrate from Travis to github actions
- Loading branch information
Showing
6 changed files
with
273 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
name: ci | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
pretest: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
toxenv: [flake8, pylint, doc8, docs] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox -e ${{ matrix.toxenv }} | ||
test: | ||
needs: pretest | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
platform: [ubuntu-latest] | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup MongoDB | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: 4.2 | ||
- name: Configure MongoDB | ||
run: mongo orion_test --eval 'db.createUser({user:"user",pwd:"pass",roles:["readWrite"]});' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: | | ||
tox -e py | ||
tox -e final-coverage | ||
tox -e codecov | ||
env: | ||
PLATFORM: ${{ matrix.platform }} | ||
backward-compatibility: | ||
needs: pretest | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 2 | ||
matrix: | ||
orion_db_type: [mongodb, pickleddb] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Setup MongoDB | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: 4.2 | ||
- name: Configure MongoDB | ||
run: mongo orion_test --eval 'db.createUser({user:"user",pwd:"pass",roles:["readWrite"]});' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: | | ||
tox -e backward-compatibility | ||
tox -e final-coverage | ||
tox -e codecov | ||
env: | ||
ORION_DB_TYPE: ${{ matrix.orion_db_type }} | ||
pypi: | ||
needs: [test, backward-compatibility] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox -e packaging | ||
conda: | ||
needs: [test, backward-compatibility] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Conda build | ||
run: ./conda/conda_test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
name: build | ||
|
||
on: | ||
schedule: | ||
- cron: '44 4 * * *' | ||
|
||
jobs: | ||
pretest: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
toxenv: [flake8, pylint, doc8, docs] | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox -e ${{ matrix.toxenv }} | ||
test: | ||
needs: pretest | ||
runs-on: ${{ matrix.platform }} | ||
strategy: | ||
max-parallel: 4 | ||
matrix: | ||
platform: [ubuntu-latest] | ||
python-version: [3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Setup MongoDB | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: 4.2 | ||
- name: Configure MongoDB | ||
run: mongo orion_test --eval 'db.createUser({user:"user",pwd:"pass",roles:["readWrite"]});' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: | | ||
tox -e py | ||
tox -e final-coverage | ||
tox -e codecov | ||
env: | ||
PLATFORM: ${{ matrix.platform }} | ||
backward-compatibility: | ||
needs: pretest | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 2 | ||
matrix: | ||
orion_db_type: [mongodb, pickleddb] | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Setup MongoDB | ||
uses: supercharge/[email protected] | ||
with: | ||
mongodb-version: 4.2 | ||
- name: Configure MongoDB | ||
run: mongo orion_test --eval 'db.createUser({user:"user",pwd:"pass",roles:["readWrite"]});' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: | | ||
tox -e backward-compatibility | ||
tox -e final-coverage | ||
tox -e codecov | ||
env: | ||
ORION_DB_TYPE: ${{ matrix.orion_db_type }} | ||
pypi: | ||
needs: [test, backward-compatibility] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox -e packaging | ||
conda: | ||
needs: [test, backward-compatibility] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
- name: Conda build | ||
run: ./conda/conda_test.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -x | ||
|
||
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh | ||
bash miniconda.sh -b -p $HOME/miniconda | ||
export PATH="$HOME/miniconda/bin:$PATH" | ||
hash -r | ||
conda config --set always_yes yes --set changeps1 no | ||
conda config --add channels conda-forge | ||
conda config --set channel_priority strict | ||
|
||
pip uninstall -y setuptools | ||
conda install -c anaconda setuptools | ||
|
||
conda update -q conda | ||
conda info -a | ||
conda install conda-build anaconda-client | ||
|
||
conda build conda --python 3.6 | ||
conda build conda --python 3.7 | ||
conda build conda --python 3.8 | ||
|
||
if [[ -n "${TRAVIS_TAG}" ]] | ||
then | ||
mkdir -p conda-bld/linux-64 | ||
cp $HOME/miniconda/conda-bld/linux-64/orion* conda-bld/linux-64/ | ||
conda convert --platform all conda-bld/linux-64/orion* --output-dir conda-bld/ | ||
anaconda -t $ANACONDA_TOKEN upload conda-bld/**/orion* | ||
fi |
Oops, something went wrong.