Skip to content

Commit

Permalink
add self test
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnv1 committed Jan 26, 2024
1 parent 888841e commit 0cb765a
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
type: string
default: ubuntu-latest
ref:
required: false
type: string
default: ${{ github.sha }}

jobs:
Expand Down Expand Up @@ -85,6 +87,9 @@ jobs:
needs: [slow, dynamo, overall]
steps:
- uses: asottile/workflows/.github/actions/[email protected]
with:
repository: kornia/kornia
ref: ${{ inputs.ref }}

- name: Download coverage reports
uses: actions/download-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
type: boolean
default: false
ref:
required: false
type: string
default: ${{ github.sha }}

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
type: boolean
default: false
ref:
required: false
type: string
default: ${{ github.sha }}

jobs:
Expand Down
79 changes: 79 additions & 0 deletions .github/workflows/self-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
name: self-test

on:
push:
branches: [main, test-me-*]
tags: '*'
pull_request:


concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
env:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: asottile/workflows/.github/actions/[email protected]
with:
path: subdir
- uses: ./subdir/.github/actions/env/
with:
ref: main

coverage:
runs-on: ubuntu-latest
steps:
- uses: asottile/workflows/.github/actions/[email protected]
with:
path: subdir
- uses: ./subdir/.github/actions/coverage/
with:
ref: main

tests:
runs-on: ubuntu-latest
steps:
- uses: asottile/workflows/.github/actions/[email protected]
with:
path: subdir
- uses: ./subdir/.github/actions/tests/
with:
ref: main

workflow-tests:
uses: ./.github/workflows/tests.yml
with:
os: ubuntu-latest
python-version: '["3.10", "3.11"]'
pytorch-version: '["2.0.0", "2.1.2"]'
pytorch-dtype: 'float32'
ref: main

workflow-coverage:
uses: ./.github/workflows/coverage.yml
with:
ref: main

workflow-mypy:
uses: ./.github/workflows/mypy.yml
with:
ref: main

workflow-docs:
uses: ./.github/workflows/docs.yml
with:
ref: main

collector:
needs: [coverage, env, tests, workflow-tests, workflow-coverage, workflow-mypy, workflow-docs]
if: always()
runs-on: ubuntu-latest
steps:
- name: check for failures
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: echo job failed && exit 1
2 changes: 2 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ on:
type: boolean
default: false
ref:
required: false
type: string
default: ${{ github.sha }}

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ on:
type: boolean
default: false
ref:
required: false
type: string
default: ${{ github.sha }}

jobs:
Expand Down

0 comments on commit 0cb765a

Please sign in to comment.