Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

int: Initial monorepo #392

Merged
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
52 changes: 52 additions & 0 deletions .github/workflows/all-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# This workflow runs tests and reports code coverage.

# We need a workflow name to be able to schedule it from Github UI
name: NightlyDependencyCheck

on:
# runs at midnight every work day
schedule:
- cron: "0 0 * * 1-5"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
strategy:
matrix:
package: ["projects/orquestra-sdk"]
uses: ./.github/workflows/package-style.yml
with:
target_path: ${{ matrix.package }}
# Choice of Python versions to run against:
# * 3.11: the latest officially supported version. Used in CE images.
python_versions: '["3.11"]'
nightly: true
style:
strategy:
matrix:
package: ["projects/orquestra-sdk"]
uses: ./.github/workflows/package-style.yml
with:
target_path: ${{ matrix.package }}
python_versions: '["3.11"]'
nightly: true
pass:
# This is a final "check" job that depends on the other jobs, it always runs
# and will fail if a dependent job fails.
# This is what we require in our PR checks
if: always()
needs:
- tests
- style
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
77 changes: 77 additions & 0 deletions .github/workflows/all-pr-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
name: Test All
on:
pull_request:
branches: [main]
workflow_dispatch:
jobs:
# This job checks for the changed paths
# We take the `changes` output of the `filter-paths` step, and use it
# as the `packages` output of the `find-changes` job.
# This output is a list of the packages that should be tested. See the
# description of the `key` in the `filter-paths` step for more information.
# Example output:
# packages: ["projects/orquestra-sdk"]
find-changes:
name: Get changed packages
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
packages: ${{ steps.filter-paths.outputs.changes }}
steps:
# This step takes `(key, value)` pairs as the `filters` input.
# The `key`, by convention in this repository, is the path to the project
# that we're checking to see is modified.
# The `value` is a list of paths that will cause this project's tests to
# be executed.
- uses: dorny/paths-filter@v3
id: filter-paths
with:
# We can codify the path dependencies between the packages here
alexjuda marked this conversation as resolved.
Show resolved Hide resolved
filters: |
projects/orquestra-sdk:
- .github/workflows/**
- projects/orquestra-sdk/**
tests:
# call the reusable workflow for the packages that changed
needs: find-changes
strategy:
matrix:
package: ${{ fromJSON(needs.find-changes.outputs.packages) }}
uses: ./.github/workflows/package-coverage.yml
with:
target_path: ${{ matrix.package }}
# Choice of Python versions to run against:
# * 3.11: the latest officially supported version. Used in CE images.
# * 3.9: the oldest supported version
python_versions: '["3.11", "3.9"]'
style:
# call the reusable workflow for the packages that changed
needs: find-changes
strategy:
matrix:
package: ${{ fromJSON(needs.find-changes.outputs.packages) }}
uses: ./.github/workflows/package-style.yml
with:
target_path: ${{ matrix.package }}
# Choice of Python versions to run against:
# * 3.11: the latest officially supported version. Used in CE images.
# * 3.9: the oldest supported version
python_versions: '["3.11", "3.9"]'
pass:
# This is a final "check" job that depends on the other jobs, it always runs
# and will fail if a dependent job fails.
# This is what we require in our PR checks
if: always()
name: Check all tests passed
needs:
- find-changes
- tests
- style
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
100 changes: 0 additions & 100 deletions .github/workflows/nightly.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,23 @@ jobs:
# The job ID has to match repo settings for PR required checks
style:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ github.workspace }}/projects/orquestra-sdk

name: Build Isolated Docs
timeout-minutes: 25

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Load a specific version of Python
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: 3.11
architecture: x64
cache: 'pip'
cache: "pip"

- name: Install deps
shell: bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ jobs:
# The job ID has to match repo settings for PR required checks
TestPerformance:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ github.workspace }}/projects/orquestra-sdk
timeout-minutes: 25
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: 3.11
architecture: x64
cache: 'pip'
cache: "pip"

# Installation method (venv/system/etc) affects Ray behavior. We're
# installing deps to a venv to align with the most common use case.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,19 @@ jobs:
# The job ID has to match repo settings for PR required checks
TypeChecking:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ github.workspace }}/projects/orquestra-sdk
timeout-minutes: 25
steps:
- name: Git Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: 3.11
architecture: x64
cache: 'pip'
cache: "pip"

# Installation method (venv/system/etc) affects Ray behavior. We're
# installing deps to a venv to align with the most common use case.
Expand Down
Loading
Loading