Bump snok/install-poetry from 1.3.4 to 1.4.1 #226
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: Test | |
on: | |
push: | |
pull_request: | |
branches: [ master ] | |
jobs: | |
Check: | |
name: Check Style Code | |
runs-on: ubuntu-20.04 | |
steps: | |
#---------------------------------------------- | |
# Check-out repo | |
#---------------------------------------------- | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
#---------------------------------------------- | |
# Install python | |
#---------------------------------------------- | |
- name: Set up python | |
id: setup-python | |
uses: actions/[email protected] | |
with: | |
python-version: 3.7 | |
#---------------------------------------------- | |
# Configure poetry | |
#---------------------------------------------- | |
- name: Install Poetry | |
uses: snok/[email protected] | |
with: | |
version: 1.1.13 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
#---------------------------------------------- | |
# Install dependencies | |
#---------------------------------------------- | |
- name: Install dependencies | |
run: poetry install --no-interaction | |
#---------------------------------------------- | |
# Run Black style | |
#---------------------------------------------- | |
- name: Black | |
run: | | |
source $VENV | |
black pprof --check | |
#---------------------------------------------- | |
# Run PEP style | |
#---------------------------------------------- | |
- name: Flake8 | |
run: | | |
source $VENV | |
flake8 pprof/ | |
Test: | |
name: Test Code | |
needs: [Check] | |
strategy: | |
matrix: | |
python: ['3.7','3.8','3.9'] | |
platform: [ubuntu-20.04, macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
#---------------------------------------------- | |
# Check-out repo | |
#---------------------------------------------- | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
#---------------------------------------------- | |
# Install python | |
#---------------------------------------------- | |
- name: Set up python | |
id: setup-python | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python }} | |
#---------------------------------------------- | |
# Configure poetry | |
#---------------------------------------------- | |
- name: Install Poetry | |
uses: snok/[email protected] | |
with: | |
version: 1.1.14 | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
installer-parallel: true | |
#---------------------------------------------- | |
# Install dependencies | |
#---------------------------------------------- | |
- name: Install dependencies | |
run: poetry install --no-interaction | |
#---------------------------------------------- | |
# Run tests | |
#---------------------------------------------- | |
- name: Pytest | |
run: | | |
source $VENV | |
pytest | |
#---------------------------------------------- | |
# Upload coverage to codecov | |
#---------------------------------------------- | |
- name: Upload coverage artifact | |
uses: actions/upload-artifact@v3 | |
if: matrix.python == '3.7' && matrix.platform == 'ubuntu-20.04' | |
with: | |
name: coverage | |
path: "*coverage.*" | |
Upload: | |
name: Uploading to Codecov | |
needs: [Test] | |
runs-on: ubuntu-20.04 | |
defaults: | |
run: | |
shell: bash | |
steps: | |
#---------------------------------------------- | |
# Check-out repo | |
#---------------------------------------------- | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
#---------------------------------------------- | |
# Download coverage artifact | |
#---------------------------------------------- | |
- name: Download coverage | |
uses: actions/download-artifact@v3 | |
with: | |
name: coverage | |
#---------------------------------------------- | |
# Upload coverage to codecov | |
#---------------------------------------------- | |
- name: Upload coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CI_CODECOV }} | |
file: ./coverage.xml | |
fail_ci_if_error: true |