Merge pull request #37 from port-labs/feat-add-release-github-action #208
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: Python application | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.11" | |
# Install Poetry | |
- name: Install Poetry | |
run: | | |
curl -sSL https://install.python-poetry.org | python3 - | |
export PATH="$HOME/.local/bin:$PATH" | |
# Install dependencies via Poetry | |
- name: Install dependencies | |
run: | | |
export PATH="$HOME/.local/bin:$PATH" | |
poetry install --no-interaction --no-ansi | |
# Run Lint | |
- name: Lint | |
run: | | |
export PATH="$HOME/.local/bin:$PATH" | |
poetry run ./scripts/lint.sh | |
# Run Tests with Pytest | |
- name: Test with pytest | |
run: | | |
export PATH="$HOME/.local/bin:$PATH" | |
poetry run ./scripts/test.sh |