Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
rstijerina committed Nov 22, 2024
1 parent 127304d commit e291538
Showing 1 changed file with 31 additions and 16 deletions.
47 changes: 31 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,29 @@ jobs:
Linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Fetch base and install Poetry
run: |
git fetch origin ${{github.base_ref}}
pipx install poetry
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: "3.11"
cache: "poetry"

- name: Install Python Packages
run: |
poetry install --only dev
- name: Run flake8
run: poetry run flake8 geoapi

- name: Formatting with black
run: |
cd devops
poetry run black --check geoapi
Geoapi_Unit_Tests:
Expand All @@ -40,38 +54,39 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Fetch base and install Poetry
run: |
git fetch origin ${{github.base_ref}}
pipx install poetry
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: "3.11"
cache: "poetry"

- name: Install ffmpeg
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
- name: Setup Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.8.3
- uses: actions/cache@v1
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install Python Packages
run: |
cd devops
poetry install --with dev,flask,worker
- name: Run server-side unit tests
run: |
cd devops
poetry run pytest ../geoapi
Workers_Unit_Tests:
runs-on: ubuntu-latest
services:
postgres:
image: mdillon/postgis:11-alpine
image: postgis/postgis:11-3.0-alpine
env:
POSTGRES_USER: dev
POSTGRES_PASSWORD: dev
Expand All @@ -84,7 +99,7 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: docker/login-action@v1
with:
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down

0 comments on commit e291538

Please sign in to comment.