Skip to content
Merged
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
2 changes: 0 additions & 2 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
name: Quick tests and coverage
runs-on: ${{ matrix.os }}
strategy:
# max 1 job at a time running against the server to make it more robust
max-parallel: 1
matrix:
os: [ubuntu-latest]
cfg:
Expand Down
105 changes: 60 additions & 45 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Nightly Build
on:
workflow_dispatch:
schedule:
- cron: "0 2 * * 1-5"
- cron: "0 2 * * *"

env:
MAIN_PYTHON_VERSION: '3.7'
Expand Down Expand Up @@ -33,10 +33,11 @@ jobs:
name: Quick tests and coverage
runs-on: ${{ matrix.os }}
strategy:
# max 1 job at a time running against the server to make it more robust
max-parallel: 1
matrix:
os: [windows-latest, ubuntu-latest]
# extend to windows once it's possible to run docker
# on windows runners:
# os: [windows-latest, ubuntu-latest]
os: [ubuntu-latest]
cfg:
- {python-version: "3.7", toxenv: "py37"}
- {python-version: "3.10", toxenv: "py310"}
Expand All @@ -52,12 +53,40 @@ jobs:
run: |
python -m pip install --upgrade pip setuptools tox tox-gh-actions

- name: Check out rep-deployments
uses: actions/checkout@v3
with:
repository: ansys/rep-deployments
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
submodules: true
path: rep-deployments

- uses: KengoTODA/actions-setup-docker-compose@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Login in Github Container registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: pyansys-ci-bot
password: ${{ secrets.PYANSYS_CI_BOT_PACKAGE_TOKEN }}

- name: Start services
run: |
docker-compose pull
LOCALHOST_ADDR=localhost docker-compose up -d keycloak
echo "Waiting a few sec ..."
sleep 5
LOCALHOST_ADDR=localhost docker-compose up -d
working-directory: ./rep-deployments/docker-compose

- name: Test with tox
run: tox -e ${{ matrix.cfg.toxenv }}-noeval-coverage
env:
REP_TEST_URL: https://repkube.westeurope.cloudapp.azure.com/dev/rep
REP_TEST_URL: https://localhost:8443/rep
REP_TEST_USERNAME: repadmin
REP_TEST_PASSWORD: ${{ secrets.REPADMIN_PASSWORD }}
REP_TEST_PASSWORD: repadmin

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
Expand All @@ -68,7 +97,7 @@ jobs:

end-to-end-tests:
name: End-to-end tests
runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- uses: actions/checkout@v3
Expand All @@ -84,8 +113,8 @@ jobs:
run: tox -e py37-witheval
env:
REP_TEST_URL: https://repkube.westeurope.cloudapp.azure.com/dev/rep
REP_TEST_USERNAME: repadmin
REP_TEST_PASSWORD: ${{ secrets.REPADMIN_PASSWORD }}
REP_TEST_USERNAME: repbuild
REP_TEST_PASSWORD: repbuild

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
Expand All @@ -94,35 +123,8 @@ jobs:
report_paths: '**/test*.xml'
check_name: End-to-end Test Report

docs:
name: Documentation
runs-on: ubuntu-latest
# needs: docs-style
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.DOC_PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools tox
- name: Generate the documentation with tox
run: tox -e doc
- name: Add gh-pages parameters
run: |
touch build/sphinx/html/.nojekyll
echo "dev.rep.docs.pyansys.com" >> build/sphinx/html/CNAME
- name: Deploy Documentation
if: github.ref == 'refs/heads/main'
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: build/sphinx/html
clean: true

build:
name: Build and publish library
name: Build wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -136,14 +138,6 @@ jobs:
python -m pip install -r requirements/requirements_build.txt
python -m build venv wheel
python -m twine check dist/*
- name: Upload to private PyPi
if: github.ref == 'refs/heads/main'
run: |
python -m twine upload --verbose --skip-existing dist/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYANSYS_PYPI_PRIVATE_PAT }}
TWINE_REPOSITORY_URL: https://pkgs.dev.azure.com/pyansys/_packaging/pyansys/pypi/upload
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
Expand All @@ -152,3 +146,24 @@ jobs:
dist/*.whl
retention-days: 5

docs:
name: Documentation
runs-on: ubuntu-latest
# needs: docs-style
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.DOC_PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools tox
- name: Generate the documentation with tox
run: tox -e doc
- name: Upload HTML Documentation
uses: actions/upload-artifact@v2
with:
name: documentation-html
path: build/sphinx/html
retention-days: 5