Skip to content

add comments

add comments #493

Workflow file for this run

name: Test Package
on:
push:
pull_request:
schedule:
- cron: '30 0 23 * *'
jobs:
flake8_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install flake8
run: pip install flake8
- name: Run flake8
run: flake8 .
python3_tests:
runs-on: ubuntu-latest
strategy:
matrix:
os: [debian13, debian12, debian11, ubuntu25.10, ubuntu24.04, ubuntu22.04]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Build the docker
env:
OS: ${{ matrix.os }}
run: docker build -t ndts .ci/${OS}_py3
- name: Run the docker
run: docker run --name ndts -d -it -v `pwd`:/home/tango ndts
- name: install python-pninexus
run: .ci/install.sh 3
- name: run tests
run: .ci/run.sh 3
- name: Append documentation for the latest release version
if: github.ref == 'refs/heads/develop' && matrix.os == 'debian13'
run: |
docker exec ndts /bin/bash -c "cp doc/index.html doc/_config.yml build"
docker exec ndts /bin/bash -c "git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'"
docker exec ndts /bin/bash -c "git fetch && git checkout gh-pages && git pull"
docker exec ndts /bin/bash -c "mkdir -p ./latest && shopt -u dotglob && rm -rf ./latest/*"
docker exec ndts /bin/bash -c "mv -f build/sphinx/html/* ./latest/"
docker exec ndts /bin/bash -c "mv -f build/index.html build/_config.yml ."
# docker exec ndts /bin/bash -c "mv -f build/devel ./latest/api/doxygen"
docker exec ndts /bin/bash -c "rm -rf ./latest/_sources"
docker exec --user root ndts /bin/bash -c "rm -rf build build_tools *.h5 src test"
- name: Extract the code version from the branch name
if: startsWith(github.ref, 'refs/heads/docs_') && matrix.os == 'debian13'
shell: bash
run: echo "##[set-output name=docver;]$(echo ${GITHUB_REF#refs/heads/docs_})"
id: extract_docver
- name: Append documentation for the extracted release version
if: startsWith(github.ref, 'refs/heads/docs_') && matrix.os == 'debian13'
run: |
echo Version: ${{ steps.extract_docver.outputs.docver }}
docker exec ndts /bin/bash -c "git config remote.origin.fetch '+refs/heads/*:refs/remotes/origin/*'"
docker exec ndts /bin/bash -c "git fetch && git checkout gh-pages && git pull"
docker exec ndts /bin/bash -c "mkdir -p ./${{ steps.extract_docver.outputs.docver }}"
docker exec ndts /bin/bash -c "shopt -u dotglob && rm -rf ./${{ steps.extract_docver.outputs.docver }}/* "
docker exec ndts /bin/bash -c "mv -f build/sphinx/html/* ./${{ steps.extract_docver.outputs.docver }}/"
# docker exec ndts /bin/bash -c "mv -f build/devel ./${{ steps.extract_docver.outputs.docver }}/api/doxygen"
docker exec ndts /bin/bash -c "rm -rf ./${{ steps.extract_docver.outputs.docver }}/_sources"
docker exec --user root ndts /bin/bash -c "rm -rf build build_tools *.h5 src test"
- name: Deploy documentation
if: (github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/heads/docs_')) && matrix.os == 'debian13'
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: .
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Build: ({sha}) {msg}"
- name: Stop the docker
run: |
docker exec --user root ndts /bin/bash -c "chown -R 1001 /home/tango "
docker container stop ndts