Skip to content

Commit 97afa6d

Browse files
Merge pull request #71 from KevinMusgrave/github-workflows
Added .github/workflows
2 parents 7fe4441 + 1e80cf3 commit 97afa6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+387
-46
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: base_test_workflow
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
module-to-test:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: [3.8]
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v2
22+
with:
23+
python-version: ${{ matrix.python-version }}
24+
- name: Install dependencies
25+
run: |
26+
pip install .[ignite,lightning,record-keeper,timm]
27+
pip install --upgrade protobuf==3.20.1
28+
- name: Run unit tests
29+
run: |
30+
TEST_DTYPES=float32,float64 TEST_DEVICE=cpu python -m unittest discover -t . -s tests/${{ inputs.module-to-test }}

.github/workflows/run_linter.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: run_linter
2+
3+
on:
4+
pull_request:
5+
branches: [ main, dev ]
6+
paths:
7+
- 'src/**'
8+
- 'tests/**'
9+
- '.github/workflows/**'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python 3.8
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.8
20+
- name: Install dependencies
21+
run: |
22+
pip install flake8
23+
- name: Lint with flake8
24+
run: |
25+
# stop the build if there are Python syntax errors or undefined names
26+
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
27+
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
28+
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics --per-file-ignores="__init__.py:F401"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: adapters
2+
3+
on:
4+
pull_request:
5+
branches: [ main, dev ]
6+
paths:
7+
- 'src/**'
8+
- 'tests/**'
9+
- '.github/workflows/**'
10+
11+
jobs:
12+
call-base-test-workflow:
13+
uses: ./.github/workflows/base_test_workflow.yml
14+
with:
15+
module-to-test: adapters
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: containers
2+
3+
on:
4+
pull_request:
5+
branches: [ main, dev ]
6+
paths:
7+
- 'src/**'
8+
- 'tests/**'
9+
- '.github/workflows/**'
10+
11+
jobs:
12+
call-base-test-workflow:
13+
uses: ./.github/workflows/base_test_workflow.yml
14+
with:
15+
module-to-test: containers
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: datasets
2+
3+
on:
4+
pull_request:
5+
branches: [ main, dev ]
6+
paths:
7+
- 'src/**'
8+
- 'tests/**'
9+
- '.github/workflows/**'
10+
11+
jobs:
12+
call-base-test-workflow:
13+
uses: ./.github/workflows/base_test_workflow.yml
14+
with:
15+
module-to-test: datasets
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: frameworks
2+
3+
on:
4+
pull_request:
5+
branches: [ main, dev ]
6+
paths:
7+
- 'src/**'
8+
- 'tests/**'
9+
- '.github/workflows/**'
10+
11+
jobs:
12+
call-base-test-workflow:
13+
uses: ./.github/workflows/base_test_workflow.yml
14+
with:
15+
module-to-test: frameworks

.github/workflows/test_hooks.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: hooks
2+
3+
on:
4+
pull_request:
5+
branches: [ main, dev ]
6+
paths:
7+
- 'src/**'
8+
- 'tests/**'
9+
- '.github/workflows/**'
10+
11+
jobs:
12+
call-base-test-workflow:
13+
uses: ./.github/workflows/base_test_workflow.yml
14+
with:
15+
module-to-test: hooks
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: inference
2+
3+
on:
4+
pull_request:
5+
branches: [ main, dev ]
6+
paths:
7+
- 'src/**'
8+
- 'tests/**'
9+
- '.github/workflows/**'
10+
11+
jobs:
12+
call-base-test-workflow:
13+
uses: ./.github/workflows/base_test_workflow.yml
14+
with:
15+
module-to-test: inference

.github/workflows/test_layers.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: layers
2+
3+
on:
4+
pull_request:
5+
branches: [ main, dev ]
6+
paths:
7+
- 'src/**'
8+
- 'tests/**'
9+
- '.github/workflows/**'
10+
11+
jobs:
12+
call-base-test-workflow:
13+
uses: ./.github/workflows/base_test_workflow.yml
14+
with:
15+
module-to-test: layers
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: meta_validators
2+
3+
on:
4+
pull_request:
5+
branches: [ main, dev ]
6+
paths:
7+
- 'src/**'
8+
- 'tests/**'
9+
- '.github/workflows/**'
10+
11+
jobs:
12+
call-base-test-workflow:
13+
uses: ./.github/workflows/base_test_workflow.yml
14+
with:
15+
module-to-test: meta_validators

0 commit comments

Comments
 (0)