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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 0 additions & 31 deletions .github/workflows/beta-release.yml

This file was deleted.

56 changes: 0 additions & 56 deletions .github/workflows/ci.yml

This file was deleted.

58 changes: 37 additions & 21 deletions .github/workflows/internal-release.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,53 @@
name: Internal Release
name: Publish module to the JFrog Artifactory

on:
push:
# '**' not '*.*': Actions glob '*' does not match '/', so '*.*' let slash
# tags (flowvault/v1.0.0) through and fired this branch-only workflow.
tags-ignore:
- '*.*'
- '**'
paths-ignore:
- "*/setup.py"
- "*.yml"
- "*.md"
- "*/skyflow/utils/_version.py"
- "samples/**"
- "flowvault/samples/**"
branches:
- release/*
- flowvault-release/*
- skyvault-release/*
# Legacy: predates the per-module naming, still maps to skyvault.
- release/*

jobs:
resolve-module:
runs-on: ubuntu-latest
# Skip our own bump commit, or this loops: bump -> push -> release -> bump.
# PAT-authenticated pushes DO trigger workflows; GITHUB_TOKEN pushes do not.
# build-and-deploy needs this job, so skipping here skips the run.
if: ${{ !contains(github.event.head_commit.message, '[AUTOMATED]') }}
outputs:
module: ${{ steps.set-module.outputs.module }}
steps:
# Explicit match, no catch-all: defaulting once published the wrong module.
- name: Resolve module from branch name
id: set-module
env:
BRANCH: ${{ github.ref_name }}
run: |
case "$BRANCH" in
flowvault-release/*) MODULE="flowvault" ;;
skyvault-release/*) MODULE="skyvault" ;;
release/*) MODULE="skyvault" ;;
*)
echo "::error::Branch '$BRANCH' does not map to a module."
exit 1
;;
esac
echo "Branch '$BRANCH' -> module '$MODULE'"
echo "module=$MODULE" >> "$GITHUB_OUTPUT"

build-and-deploy:
strategy:
matrix:
include:
- variant: v2
package-name: skyflow
tag-prefix: ''
- variant: flowvault
package-name: skyflow_flowvault
tag-prefix: 'flowvault-'
if: (matrix.variant == 'flowvault' && startsWith(github.ref_name, 'flowvault-')) || (matrix.variant == 'v2' && !startsWith(github.ref_name, 'flowvault-'))
needs: resolve-module
uses: ./.github/workflows/shared-build-and-deploy.yml
with:
ref: ${{ github.ref_name }}
tag: 'internal'
variant: ${{ matrix.variant }}
package-name: ${{ matrix.package-name }}
tag-prefix: ${{ matrix.tag-prefix }}
module: ${{ needs.resolve-module.outputs.module }}
secrets: inherit

32 changes: 0 additions & 32 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,7 @@ on:

jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- variant: v2
package-name: skyflow
coverage-omit: "skyflow/generated/*,skyflow/utils/validations/*,skyflow/vault/data/*,skyflow/vault/detect/*,skyflow/vault/tokens/*,skyflow/vault/connection/*,skyflow/error/*,skyflow/utils/enums/*,skyflow/vault/controller/_audit.py,skyflow/vault/controller/_bin_look_up.py"
- variant: flowvault
package-name: skyflow_flowvault
coverage-omit: "skyflow_flowvault/generated/*"
uses: ./.github/workflows/shared-tests.yml
with:
python-version: '3.9'
variant: ${{ matrix.variant }}
package-name: ${{ matrix.package-name }}
coverage-omit: ${{ matrix.coverage-omit }}
secrets: inherit

test-common:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- run: pip install -e ./common
- run: pip install coverage
- run: python -m coverage run --source=common --omit="common/generated/*,common/tests/*" -m unittest discover -s common/tests -t .
- run: coverage xml -o test-coverage.xml
- name: Codecov
uses: codecov/codecov-action@v2.1.0
with:
token: ${{ secrets.CODECOV_REPO_UPLOAD_TOKEN }}
files: test-coverage.xml
name: codecov-skyflow-python-common
verbose: true
84 changes: 84 additions & 0 deletions .github/workflows/pr-flowvault.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: PR CI Checks (flowvault)

# flowvault is a folder under main, alongside skyvault - not a branch.
# This workflow fires for PRs targeting main or a flowvault-release/* branch
# that actually touch flowvault or its common dependency, and only builds/
# tests those two modules. skyvault (and the full 3-module suite) is covered
# by pr.yml, not here.

on:
pull_request:
branches: [ "main", "flowvault-release/**" ]
paths:
- "flowvault/**"
- "common/**"

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: '3.9'

# flowvault depends on common as a local path dependency, so common
# must be built and installed first or flowvault's own build/install
# will fail to resolve it.
- name: Build and install common
run: |
python -m pip install --upgrade pip setuptools wheel
cd common
python setup.py sdist bdist_wheel
pip install dist/*.whl

- name: Build flowvault
run: |
cd flowvault
python setup.py sdist bdist_wheel

test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v2
with:
python-version: '3.9'

- name: create-json
id: create-json
uses: jsdaniell/create-json@1.1.2
with:
name: "credentials.json"
json: ${{ secrets.VALID_SKYFLOW_CREDS_TEST }}

- name: Run flowvault unit tests
run: |
python -m pip install --upgrade pip setuptools wheel coverage
cp credentials.json flowvault/credentials.json

# flowvault depends on common as a local path dependency.
cd common
python setup.py sdist bdist_wheel
pip install dist/*.whl
cd ..

cd flowvault
python setup.py sdist bdist_wheel
pip install dist/*.whl
if [ -f requirements.txt ]; then
pip install -r requirements.txt
fi
python -m coverage run --source=. -m unittest discover
coverage xml -o test-coverage.xml

- name: Codecov
uses: codecov/codecov-action@v2.1.0
with:
token: ${{ secrets.CODECOV_REPO_UPLOAD_TOKEN }}
files: flowvault/test-coverage.xml
flags: flowvault
name: codecov-skyflow-python-flowvault
verbose: true
24 changes: 24 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: PR CI Checks

on: [pull_request]

jobs:
check-commit-message:
name: Check Commit Message
runs-on: ubuntu-latest
steps:
- name: Check JIRA ID
uses: gsactions/commit-message-checker@v1
with:
pattern: '(\[?[A-Z]{1,5}-[1-9][0-9]*)|(\[AUTOMATED\])|(Merge)|(Release).+$'
flags: 'gm'
excludeDescription: 'true'
checkAllCommitMessages: 'true'
accessToken: ${{ secrets.PAT_ACTIONS }}
error: 'One of your your commit messages is not matching the format with JIRA ID Ex: ( SDK-123 commit message )'

test:
uses: ./.github/workflows/shared-tests.yml
with:
python-version: '3.9'
secrets: inherit
Loading
Loading