Skip to content

Commit

Permalink
Merge pull request #19 from aws-solutions-library-samples/dev
Browse files Browse the repository at this point in the history
release: updating integration test package
  • Loading branch information
drduhe authored Nov 13, 2023
2 parents 12d1f0e + 716d3e4 commit d55b6c2
Show file tree
Hide file tree
Showing 45 changed files with 49,042 additions and 1,984 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Docs
on: [push, pull_request, workflow_dispatch]
name: Generate and Publish Documentation for OSML Model Runner Test

on:
workflow_call:

permissions:
contents: write

jobs:
docs:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -13,14 +18,14 @@ jobs:
pip install sphinx
python -m pip install sphinx-autoapi
python -m pip install sphinx_rtd_theme
python -m pip install tox tox-gh-actions
- name: Sphinx build
run: |
sphinx-build doc _build
tox -e docs
- name: Deploy
uses: peaceiris/[email protected]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
publish_dir: .tox/docs/tmp/html/
force_orphan: true
18 changes: 18 additions & 0 deletions .github/workflows/notify-guidance-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Notify Guidance Overhead Imagery Repo

on:
workflow_call:

jobs:
notify:
runs-on: ubuntu-latest
steps:
- name: Short Sha
uses: benjlevesque/[email protected]
- name: Invoke Guidance OSML Submodule Workflow
uses: benc-uk/[email protected]
with:
repo: aws-solutions-library-samples/guidance-for-overhead-imagery-inference-on-aws
workflow: osml_update_submodules.yml
token: ${{ secrets.GUIDANCE_OSML_SUBMODULES_ACTION_10_24 }}
inputs: '{ "DISPATCH_REPO_NAME" : "${{ github.event.repository.name }}", "DISPATCH_REPO_SHA": "${{ env.SHA }}" }'
10 changes: 10 additions & 0 deletions .github/workflows/osml-model-runner-test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: "OSML Model Runner Test Build Workflow"

on:
pull_request:
branches: ["main", "dev"]

jobs:
Build_Validate_Tox:
uses: ./.github/workflows/python-tox.yml
secrets: inherit
22 changes: 22 additions & 0 deletions .github/workflows/osml-model-runner-test-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: "OSML Model Runner Test Build and Publish Workflow"

on:
push:
branches: ["main", "dev"]

jobs:
Build_Validate_Tox:
uses: ./.github/workflows/python-tox.yml
secrets: inherit
Publish_Python:
needs: [Build_Validate_Tox]
uses: ./.github/workflows/python-publish.yml
secrets: inherit
Publish_Documentation:
needs: [Build_Validate_Tox]
uses: ./.github/workflows/documentation-publish.yml
secrets: inherit
Notify_Guidance_Repo:
needs: [Build_Validate_Tox]
uses: ./.github/workflows/notify-guidance-repo.yml
secrets: inherit
33 changes: 33 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries

name: Publish Python Package

on:
workflow_call:
release:
types: [published]

permissions:
contents: read
id-token: write

jobs:
deploy:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/[email protected]
30 changes: 30 additions & 0 deletions .github/workflows/python-tox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Build/Validation with Tox

on:
workflow_call:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: 'true'
ssh-key: ${{ secrets.git_ssh_key }}
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip tox
- name: Validate package with tox
run: |
# stop the build if there are Python syntax errors or undefined names
tox
Loading

0 comments on commit d55b6c2

Please sign in to comment.