Skip to content

Commit

Permalink
update github actions to 3.11; formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rstijerina committed Nov 14, 2024
1 parent 446efd6 commit 43d63f0
Showing 1 changed file with 43 additions and 43 deletions.
86 changes: 43 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ '**' ]
branches: ["**"]
jobs:
Linting:
runs-on: ubuntu-latest
Expand All @@ -13,7 +13,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: 3.11
- name: Install flake8
run: pip install flake8
- name: Run flake8
Expand All @@ -31,40 +31,40 @@ jobs:
POSTGRES_PASSWORD: dev
POSTGRES_DB: test
ports:
- 5432:5432
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- 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
- name: Run server-side unit tests
run: |
cd devops
poetry run pytest ../geoapi
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- 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
- name: Run server-side unit tests
run: |
cd devops
poetry run pytest ../geoapi
Workers_Unit_Tests:
runs-on: ubuntu-latest
services:
Expand All @@ -82,15 +82,15 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: docker/login-action@v1
with:
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ secrets.DOCKER_USER }}
- name: Build worker image
run: |
docker pull taccaci/geoapi-workers:latest
docker build --cache-from taccaci/geoapi-workers:latest -t taccaci/geoapi-workers:latest -f devops/Dockerfile.worker .
- name: Run worker test
run: |
docker run --network="host" -e APP_ENV='testing' -e DB_HOST='localhost' taccaci/geoapi-workers:latest pytest -m "worker"
- uses: actions/checkout@v3
- uses: docker/login-action@v1
with:
password: ${{ secrets.DOCKER_PASSWORD }}
username: ${{ secrets.DOCKER_USER }}
- name: Build worker image
run: |
docker pull taccaci/geoapi-workers:latest
docker build --cache-from taccaci/geoapi-workers:latest -t taccaci/geoapi-workers:latest -f devops/Dockerfile.worker .
- name: Run worker test
run: |
docker run --network="host" -e APP_ENV='testing' -e DB_HOST='localhost' taccaci/geoapi-workers:latest pytest -m "worker"

0 comments on commit 43d63f0

Please sign in to comment.