-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reuse github actions from superdesk repo (#158)
- use black for formatting - fix mypy errors
- Loading branch information
Showing
20 changed files
with
812 additions
and
580 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 |
---|---|---|
@@ -1,79 +1,32 @@ | ||
name: "CI" | ||
|
||
on: | ||
[push, pull_request] | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
|
||
server: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
redis: | ||
image: redis:alpine | ||
ports: | ||
- "6379:6379" | ||
|
||
mongo: | ||
image: mongo:4 | ||
ports: | ||
- "27017:27017" | ||
|
||
elastic: | ||
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.23 | ||
ports: | ||
- "9200:9200" | ||
env: | ||
discovery.type: single-node | ||
|
||
defaults: | ||
run: | ||
working-directory: server | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: setup python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.8' | ||
|
||
- name: apt-get | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install libxml2-dev libxmlsec1-dev libxmlsec1-openssl libexempi-dev | ||
- name: pip install | ||
run: | | ||
python -m pip install --upgrade pip wheel setuptools | ||
python -m pip install -r dev-requirements.txt | ||
- run: flake8 | ||
|
||
- run: pytest tests | ||
|
||
- run: behave --format progress2 --logging-level=ERROR | ||
|
||
- run: python manage.py app:initialize_data | ||
strategy: | ||
matrix: | ||
python-version: ['3.10'] | ||
uses: superdesk/superdesk/.github/workflows/server.yml@develop | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
pytest: | ||
strategy: | ||
matrix: | ||
python-version: ['3.10'] | ||
uses: superdesk/superdesk/.github/workflows/pytest.yml@develop | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
behave: | ||
strategy: | ||
matrix: | ||
python-version: ['3.10'] | ||
uses: superdesk/superdesk/.github/workflows/behave.yml@develop | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
client: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
working-directory: client | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 14.x | ||
|
||
- run: git config --global url."https://git@".insteadOf git:// | ||
- name: npm ci | ||
run: npm install --no-audit | ||
|
||
- name: grunt build | ||
run: npm run build | ||
uses: superdesk/superdesk/.github/workflows/client.yml@develop |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,8 +1,12 @@ | ||
-r requirements.txt | ||
|
||
flake8 | ||
pep8 | ||
httmock | ||
wooper | ||
pytest | ||
responses | ||
black==24.10.0 | ||
mypy==1.14.1 | ||
flake8==7.1.1 | ||
pep8==1.7.1 | ||
httmock==1.4.0 | ||
wooper==0.4.4 | ||
pytest==8.3.4 | ||
responses==0.25.3 | ||
|
||
types-pytz |
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
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 |
---|---|---|
@@ -1,13 +1,12 @@ | ||
|
||
import os | ||
import multiprocessing | ||
|
||
bind = '0.0.0.0:%s' % os.environ.get('PORT', '5000') | ||
workers = int(os.environ.get('WEB_CONCURRENCY', multiprocessing.cpu_count() + 1)) | ||
bind = "0.0.0.0:%s" % os.environ.get("PORT", "5000") | ||
workers = int(os.environ.get("WEB_CONCURRENCY", multiprocessing.cpu_count() + 1)) | ||
|
||
accesslog = '-' | ||
access_log_format = '%(m)s %(U)s status=%(s)s time=%(T)ss size=%(B)sb' | ||
accesslog = "-" | ||
access_log_format = "%(m)s %(U)s status=%(s)s time=%(T)ss size=%(B)sb" | ||
|
||
reload = 'SUPERDESK_RELOAD' in os.environ | ||
reload = "SUPERDESK_RELOAD" in os.environ | ||
|
||
timeout = int(os.environ.get('WEB_TIMEOUT', 30)) | ||
timeout = int(os.environ.get("WEB_TIMEOUT", 30)) |
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
Oops, something went wrong.