Skip to content

Commit

Permalink
Merge pull request #34 from Ostorlab/trigger-actions-on-all-branches
Browse files Browse the repository at this point in the history
Trigger github actions without duplicate.
  • Loading branch information
3asm authored May 22, 2023
2 parents 6edb06d + cbd3fc7 commit 507e20a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 35 deletions.
43 changes: 23 additions & 20 deletions .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# This workflow use pylint:
# - Install Python dependencies.
# - Run pylint for each of the supported Python versions.
Expand All @@ -7,9 +8,11 @@ name: Pylint & Mypy

on:
push:
branches: [ main ]
branches:
- main
pull_request:
branches: [ main ]
branches:
- '*'

jobs:
build:
Expand All @@ -21,21 +24,21 @@ jobs:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies.
run: |
python -m pip install --upgrade pip
python -m pip install -r requirement.txt
python -m pip install -r tests/test-requirement.txt
- name: Running Black.
uses: psf/black@stable
with:
options: "--check"
- name: Running linter.
run: |
pylint --rcfile=.pylintrc --ignore=tests/ agent/
pylint --rcfile=.pylintrc -d C0103,W0613 tests/
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies.
run: |
python -m pip install --upgrade pip
python -m pip install -r requirement.txt
python -m pip install -r tests/test-requirement.txt
- name: Running Black.
uses: psf/black@stable
with:
options: "--check"
- name: Running linter.
run: |
pylint --rcfile=.pylintrc --ignore=tests/ agent/
pylint --rcfile=.pylintrc -d C0103,W0613 tests/
33 changes: 18 additions & 15 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# This workflow use pytest:
# - Install Python dependencies.
# - Run pytest for each of the supported Python versions ["3.8", "3.9", "3.10"].
Expand All @@ -7,9 +8,11 @@ name: Pytest.

on:
push:
branches: [ main ]
branches:
- main
pull_request:
branches: [ main ]
branches:
- '*'

concurrency:
group: ${{ github.ref }}
Expand All @@ -24,16 +27,16 @@ jobs:
python-version: ["3.10"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies.
run: |
python -m pip install --upgrade pip
python -m pip install -r requirement.txt
python -m pip install -r tests/test-requirement.txt
- name: Runnning tests with pytest.
run: |
pytest -m "not docker" --cov
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies.
run: |
python -m pip install --upgrade pip
python -m pip install -r requirement.txt
python -m pip install -r tests/test-requirement.txt
- name: Runnning tests with pytest.
run: |
pytest -m "not docker" --cov

0 comments on commit 507e20a

Please sign in to comment.