Link to contributing readme #40
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
name: Merge master, run tests and build documentation | |
on: | |
pull_request: | |
branches: [master] | |
push: | |
branches: [master] | |
workflow_dispatch: | |
inputs: | |
reason: | |
description: Why did you trigger the pipeline? | |
required: False | |
default: Check if it runs again due to external changes | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# pandoc needed for docu, see https://nbsphinx.readthedocs.io/en/0.7.1/installation.html?highlight=pandoc#pandoc | |
- name: Install Non-Python Packages | |
run: sudo apt-get update -yq && sudo apt-get -yq install pandoc | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
lfs: true | |
persist-credentials: false | |
# lfs=true is not enough, see https://stackoverflow.com/questions/61463578/github-actions-actions-checkoutv2-lfs-true-flag-not-converting-pointers-to-act | |
- name: Checkout LFS Objects | |
run: git lfs pull | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Merge master into current branch | |
if: github.ref != 'refs/heads/master' | |
run: | | |
git fetch origin master:master --update-head-ok | |
git merge master | |
- name: Setup Python {{cookiecutter.python_version}} | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.8 | |
- name: Setup git user and requirements | |
run: | | |
git config --global user.email [email protected] | |
git config --global user.name "automated_user" | |
pip install cookiecutter tox | |
- name: Run integration test | |
run: | | |
bash tests/integration_test.sh -f --skip-build -o temp/ | |
ls | |
ls temp | |
- name: Push output to github repo | |
uses: MischaPanch/github-action-push-to-another-repository@main | |
env: | |
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} | |
with: | |
source-directory: 'temp/pymetrius_output' | |
destination-github-username: 'appliedAI-Initiative' | |
destination-repository-name: 'pymetrius_output' | |
user-email: [email protected] | |
user-name: pymetrius_automated | |
target-branch: develop | |
force: true |