[feat] Check and skip corrupted runs #2212
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sanity checks on opened pull requests | |
on: | |
pull_request: | |
branches: | |
- main | |
- release/** | |
- feature/** | |
paths: | |
- 'aim/cli/**' | |
- 'aim/ext/**' | |
- 'aim/sdk/**' | |
- 'aim/web/api/**' | |
- 'aim/storage/**' | |
- 'aim/utils/**' | |
- '.github/workflows/pull-request.yml' | |
- 'tests/**' | |
- 'performance_tests/**' | |
- 'setup.py' | |
types: | |
- opened | |
- synchronize | |
- ready_for_review | |
- reopened | |
- edited | |
jobs: | |
validate-naming-convention: | |
name: Pull Request's title matches naming convention | |
runs-on: ubuntu-latest | |
steps: | |
- uses: deepakputhraya/action-pr-title@master | |
with: | |
regex: '^\[(?:feat|fix|doc|refactor|deprecation)\]\s[A-Z].*(?<!\.)$' | |
github_token: ${{ github.token }} | |
run-checks: | |
if: github.event.pull_request.draft == false && github.event.action != 'edited' | |
runs-on: ubuntu-latest | |
name: Run Unit-tests & Code-style checks | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.7' | |
architecture: x64 | |
- name: install deps | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.dev.txt | |
python -m pip install -r tests/requirements.txt | |
- name: code style checks | |
run: | | |
flake8 aim | |
- name: unit-tests | |
run: | | |
pytest --cov-report term --cov-branch --cov-fail-under=50 --cov=aim/web --cov=aim/storage --cov=aim/sdk tests | |
storage-performance-checks: | |
needs: run-checks | |
concurrency: perf-tests | |
runs-on: [self-hosted, performance-tests] | |
name: Performance tests | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.head_ref }} | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
- name: install deps | |
run: | | |
python3 -m venv venv | |
. venv/bin/activate | |
python -m pip install --upgrade pip | |
python -m pip install -r requirements.dev.txt | |
python -m pip install -r performance_tests/requirements.txt | |
- name: perf tests | |
run: | | |
. venv/bin/activate | |
export AWS_ACCESS_KEY_ID=${{ secrets.AIM_LOGS_AWS_ACCESS_KEY_ID }} | |
export AWS_SECRET_ACCESS_KEY=${{ secrets.AIM_LOGS_AWS_SECRET_ACCESS_KEY }} | |
pytest performance_tests || pytest --lf performance_tests |