From 9cfc995cbeab1fad709c74ce92fc508dfbaae8d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Gustavo=20A=2E=20Amorim?= Date: Thu, 25 Jan 2024 17:30:59 -0300 Subject: [PATCH] add self test --- .github/workflows/coverage.yml | 2 + .github/workflows/docs.yml | 2 + .github/workflows/mypy.yml | 2 + .github/workflows/self-tests.yml | 70 ++++++++++++++++++++++++++++++++ .github/workflows/tests.yml | 2 + .github/workflows/tutorials.yml | 2 + 6 files changed, 80 insertions(+) create mode 100644 .github/workflows/self-tests.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 6babffc..6af8c8a 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -18,6 +18,8 @@ on: type: string default: ubuntu-latest ref: + required: false + type: string default: ${{ github.sha }} jobs: diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 95f0b41..e0776ea 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,6 +18,8 @@ on: type: boolean default: false ref: + required: false + type: string default: ${{ github.sha }} jobs: diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 54422f3..c3db810 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -18,6 +18,8 @@ on: type: boolean default: false ref: + required: false + type: string default: ${{ github.sha }} jobs: diff --git a/.github/workflows/self-tests.yml b/.github/workflows/self-tests.yml new file mode 100644 index 0000000..a597eee --- /dev/null +++ b/.github/workflows/self-tests.yml @@ -0,0 +1,70 @@ +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/fast-checkout@v1.6.0 + with: + path: subdir + - uses: ./subdir/.github/actions/env/ + with: + ref: main + + coverage: + runs-on: ubuntu-latest + steps: + - uses: asottile/workflows/.github/actions/fast-checkout@v1.6.0 + with: + path: subdir + - uses: ./subdir/.github/actions/coverage/actions.yml + with: + ref: main + + tests: + runs-on: ubuntu-latest + steps: + - uses: asottile/workflows/.github/actions/fast-checkout@v1.6.0 + with: + path: subdir + - uses: ./subdir/.github/actions/tests/actions.yml + 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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0a1dc64..156c20f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,6 +30,8 @@ on: type: boolean default: false ref: + required: false + type: string default: ${{ github.sha }} jobs: diff --git a/.github/workflows/tutorials.yml b/.github/workflows/tutorials.yml index 0b2996d..7db4fbc 100644 --- a/.github/workflows/tutorials.yml +++ b/.github/workflows/tutorials.yml @@ -18,6 +18,8 @@ on: type: boolean default: false ref: + required: false + type: string default: ${{ github.sha }} jobs: