From 33a567437afd31bc98d433b24c5795a9ea196a33 Mon Sep 17 00:00:00 2001 From: Gennady Kandaurov Date: Mon, 16 Sep 2024 22:10:58 +0300 Subject: [PATCH] Create validation.yml --- .github/workflows/validation.yml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/validation.yml diff --git a/.github/workflows/validation.yml b/.github/workflows/validation.yml new file mode 100644 index 0000000..509a732 --- /dev/null +++ b/.github/workflows/validation.yml @@ -0,0 +1,38 @@ +name: Validation + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + + workflow_dispatch: + +jobs: + validate_homeworks: + name: Validate all homeworks + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5.2.0 + with: + python-version: '3.12' + cache: 'pip' + + - name: Install dependencies + run: pip install -r requirements.txt + + - name: Check flake8 + run: flake8 . + + - name: Check pylint + if: ${{ always() }} + run: pylint ./*/*.py + + - name: Check tests with pytest + if: ${{ always() }} + run: coverage run -m pytest . + + - name: Check test coverage + run: coverage report -m