-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update github actions to 3.11; formatting
- Loading branch information
1 parent
446efd6
commit 43d63f0
Showing
1 changed file
with
43 additions
and
43 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ name: CI | |
|
||
on: | ||
push: | ||
branches: [ main ] | ||
branches: [main] | ||
pull_request: | ||
branches: [ '**' ] | ||
branches: ["**"] | ||
jobs: | ||
Linting: | ||
runs-on: ubuntu-latest | ||
|
@@ -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 | ||
|
@@ -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: | ||
|
@@ -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" |