-
Notifications
You must be signed in to change notification settings - Fork 6
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 #8 from secondmind-labs/va/snok-github-actions
change github action for tests
- Loading branch information
Showing
5 changed files
with
166 additions
and
116 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 |
---|---|---|
|
@@ -20,44 +20,76 @@ on: | |
- develop | ||
|
||
jobs: | ||
docs: | ||
check-test-deploy-docs: | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCS: "" | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
tensorflow: [2.2.1] | ||
poetry-version: [1.1.6] | ||
python-version: [ 3.7 ] | ||
tensorflow: [ 2.2.1 ] | ||
name: Python-${{ matrix.python-version }} tensorflow${{ matrix.tensorflow }} | ||
env: | ||
VERSION_TF: ${{ matrix.tensorflow }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
#---------------------------------------------- | ||
# check-out repo and set-up python | ||
#---------------------------------------------- | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: Set up python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run image | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('notebook_requirements.txt') }}-${{ hashFiles('tests_requirements.txt') }} | ||
# ------------ install markovflow | ||
- name: Install package | ||
run: poetry install | ||
- name: make documentation | ||
run: | | ||
make docs | ||
- run: | | ||
TMP_DIR=$(mktemp -d -p $(pwd)) | ||
mv docs/_build/html/* $TMP_DIR | ||
rm -rf docs | ||
mv $TMP_DIR docs | ||
touch docs/.nojekyll | ||
- run: | | ||
git add . | ||
git config --global user.email "none" | ||
git config --global user.name "github-actions-bot" | ||
git commit -m "build documentation" | ||
git push -f origin HEAD:gh-pages | ||
#---------------------------------------------- | ||
# ----- install & configure poetry ----- | ||
#---------------------------------------------- | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.1.6 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
#---------------------------------------------- | ||
# load cached venv if cache exists | ||
#---------------------------------------------- | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
#---------------------------------------------- | ||
# install dependencies if cache does not exist | ||
#---------------------------------------------- | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
#---------------------------------------------- | ||
# install root project | ||
#---------------------------------------------- | ||
- name: Install library | ||
run: poetry install --no-interaction | ||
#---------------------------------------------- | ||
# run test suite | ||
#---------------------------------------------- | ||
- name: Run tests | ||
run: poetry run task quicktest | ||
#---------------------------------------------- | ||
# build documentation | ||
#---------------------------------------------- | ||
- name: make documentation | ||
run: | | ||
source .venv/bin/activate | ||
make docs | ||
- run: | | ||
TMP_DIR=$(mktemp -d -p $(pwd)) | ||
mv docs/_build/html/* $TMP_DIR | ||
rm -rf docs | ||
mv $TMP_DIR docs | ||
touch docs/.nojekyll | ||
- run: | | ||
git add . | ||
git config --global user.email "none" | ||
git config --global user.name "github-actions-bot" | ||
git commit -m "build documentation" | ||
git push -f origin HEAD:gh-pages |
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 |
---|---|---|
|
@@ -17,32 +17,56 @@ name: Tests | |
on: [push] | ||
|
||
jobs: | ||
check-and-test: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
tensorflow: [2.2.1] | ||
poetry-version: [1.1.6] | ||
python-version: [ 3.7 ] | ||
tensorflow: [ 2.2.1 ] | ||
name: Python-${{ matrix.python-version }} tensorflow${{ matrix.tensorflow }} | ||
env: | ||
VERSION_TF: ${{ matrix.tensorflow }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
#---------------------------------------------- | ||
# check-out repo and set-up python | ||
#---------------------------------------------- | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: Set up python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run image | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('notebook_requirements.txt') }}-${{ hashFiles('tests_requirements.txt') }} | ||
# ------------ install markovflow | ||
- name: Install package | ||
run: poetry install | ||
# ------------ run tests | ||
- name: Run tests | ||
run: poetry run task quicktest | ||
#---------------------------------------------- | ||
# ----- install & configure poetry ----- | ||
#---------------------------------------------- | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
version: 1.1.6 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
|
||
#---------------------------------------------- | ||
# load cached venv if cache exists | ||
#---------------------------------------------- | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
#---------------------------------------------- | ||
# install dependencies if cache does not exist | ||
#---------------------------------------------- | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
#---------------------------------------------- | ||
# install root project | ||
#---------------------------------------------- | ||
- name: Install library | ||
run: poetry install --no-interaction | ||
#---------------------------------------------- | ||
# run test suite | ||
#---------------------------------------------- | ||
- name: Run tests | ||
run: poetry run task quicktest |
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 |
---|---|---|
|
@@ -14,75 +14,69 @@ | |
|
||
name: Upload-PyPI | ||
|
||
|
||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet | ||
tags: v[0-9]+.[0-9]+.[0-9]+* | ||
|
||
jobs: | ||
check-and-test: | ||
check-test-deploy-docs: | ||
runs-on: ubuntu-latest | ||
env: | ||
DOCS: "" | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
tensorflow: [2.2.1] | ||
poetry-version: [1.1.6] | ||
name: Python-${{ matrix.python-version }} | ||
python-version: [ 3.7 ] | ||
tensorflow: [ 2.2.1 ] | ||
name: Python-${{ matrix.python-version }} tensorflow${{ matrix.tensorflow }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
#---------------------------------------------- | ||
# check-out repo and set-up python | ||
#---------------------------------------------- | ||
- name: Check out repository | ||
uses: actions/checkout@v2 | ||
- name: Set up python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# ------------ Install poetry | ||
- name: Setup pip/poetry | ||
run: | | ||
pip install -U pip poetry twine | ||
poetry config virtualenvs.create false | ||
# ------------ build and install package | ||
- name: Install package | ||
run: poetry install | ||
# ------------ run tests | ||
- name: Run tests | ||
run: poetry run task test | ||
pypi: | ||
# needs: check-and-test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7] | ||
poetry-version: [1.1.6] | ||
name: Release PyPi package | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
#---------------------------------------------- | ||
# ----- install & configure poetry ----- | ||
#---------------------------------------------- | ||
- name: Install Poetry | ||
uses: snok/install-poetry@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# ------------ Install poetry | ||
- name: Setup pip/poetry | ||
version: 1.1.6 | ||
virtualenvs-create: true | ||
virtualenvs-in-project: true | ||
installer-parallel: true | ||
#---------------------------------------------- | ||
# load cached venv if cache exists | ||
#---------------------------------------------- | ||
- name: Load cached venv | ||
id: cached-poetry-dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: .venv | ||
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | ||
#---------------------------------------------- | ||
# install dependencies if cache does not exist | ||
#---------------------------------------------- | ||
- name: Install dependencies | ||
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | ||
run: poetry install --no-interaction --no-root | ||
#---------------------------------------------- | ||
# install root project | ||
#---------------------------------------------- | ||
- name: Install library | ||
run: | | ||
pip install -U pip poetry twine | ||
poetry config virtualenvs.create false | ||
# ------------ build and install package | ||
# - name: Install package | ||
# run: | | ||
# poetry install | ||
# poetry build | ||
- name: Build and publish to pypi | ||
uses: JRubics/[email protected] | ||
poetry install --no-interaction | ||
poetry build | ||
#---------------------------------------------- | ||
# publish to pypi | ||
#---------------------------------------------- | ||
- name: Publish to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
python_version: "3.7" | ||
poetry_version: "==1.1.6" # (PIP version specifier syntax) | ||
pypi_token: ${{ secrets.PYPI_TOKEN }} | ||
build_format: "sdist" | ||
repository_name: "markovflow" | ||
repository_url: "https://github.com/secondmind-labs/markovflow" | ||
ignore_dev_requirements: "yes" | ||
# # ------------ publish to pypi | ||
# - name: Publish to PyPI | ||
# uses: pypa/gh-action-pypi-publish@release/v1 | ||
# with: | ||
# user: __token__ | ||
# password: ${{ secrets.PYPI_TOKEN }} | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |
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 |
---|---|---|
@@ -1 +1 @@ | ||
0.0.7 | ||
0.0.12 |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "markovflow" | ||
version = "0.0.7" | ||
version = "0.0.12" | ||
description = "A Tensorflow based library for Time Series Modelling with Gaussian Processes" | ||
authors = ["Markovflow Contributors <[email protected]>"] | ||
packages = [{include = "markovflow"}] | ||
|