Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into irlanda/v7.5.91
Browse files Browse the repository at this point in the history
  • Loading branch information
Robi9 committed Sep 26, 2023
2 parents e6d4844 + 38f5ba7 commit f2d03fd
Show file tree
Hide file tree
Showing 795 changed files with 16,081 additions and 83,554 deletions.
1 change: 0 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ exclude_lines =
omit =
*/gen/*
*/tests*
*__init__*
*settings*
temba/*/management/commands/*
Expand Down
1 change: 0 additions & 1 deletion .coveragerc_todo
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ exclude_lines =
omit =
*/gen/*
*/tests*
*__init__*
*settings*
temba/*/management/commands/*

Expand Down
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Getting Help
url: https://groups.google.com/g/rapidpro-dev
about: If you have a question about your own installation, ask a question on the dev list.
- name: Bugs and feature requests
url: https://github.com/nyaruka/rapidpro/issues
about: Open an issue with the maintainers to file a bug you found or to collaborate on new features.
157 changes: 79 additions & 78 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,98 +4,99 @@ jobs:
test:
name: Test
env:
python-version: '3.9.x'
postgis-version: '3.1'
redis-version: '5.0.6'
node-version: '10'
elastic-version: '7.17.2'
rpindexer-version: '7.3.7'
mailroom-version: '7.3.18'
python-version: "3.9.x"
postgis-version: "3.1"
redis-version: "5.0.6"
node-version: "10"
elastic-version: "7.17.6"
rpindexer-version: "7.5.0"
mailroom-version: "7.5.27"
DJANGO_SETTINGS_MODULE: temba.settings_ci
strategy:
matrix:
pg-version: ['12', '13']
pg-version: ["12", "13"]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Checkout code
uses: actions/checkout@v1

- name: Install PostgreSQL and PostGIS
uses: nyaruka/[email protected]
with:
postgresql version: ${{ matrix.pg-version }}
postgis version: ${{ env.postgis-version }}
postgresql db: temba
postgresql user: temba
postgresql password: temba
postgresql arguments: '--jit=off'
- name: Install PostgreSQL and PostGIS
uses: nyaruka/[email protected]
with:
postgresql version: ${{ matrix.pg-version }}
postgis version: ${{ env.postgis-version }}
postgresql db: temba
postgresql user: temba
postgresql password: temba
postgresql arguments: "--jit=off"

- name: Install Linux packages
run: |
sudo apt update
sudo apt install -y --no-install-recommends libgdal-dev gettext
- name: Install Linux packages
run: |
sudo apt update
sudo apt install -y --no-install-recommends libgdal-dev gettext ffmpeg
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: ${{ env.python-version }}
- name: Install Python
uses: actions/setup-python@v1
with:
python-version: ${{ env.python-version }}

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true

- name: Install Redis
uses: zhulik/[email protected]
with:
redis version: ${{ env.redis-version }}
- name: Install Redis
uses: zhulik/[email protected]
with:
redis version: ${{ env.redis-version }}

- name: Install ElasticSearch
uses: nyaruka/elasticsearch-action@master
with:
elastic version: ${{ env.elastic-version }}
- name: Install ElasticSearch
uses: nyaruka/elasticsearch-action@master
with:
elastic version: ${{ env.elastic-version }}

- name: Install Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.node-version }}
- name: Install Node
uses: actions/setup-node@v1
with:
node-version: ${{ env.node-version }}

- name: Initialize environment
run: |
poetry install
npm install
sudo npm install -g less
ln -s ${{ github.workspace }}/temba/settings.py.dev ${{ github.workspace }}/temba/settings.py
poetry run ./manage.py migrate
# fetch and extract rp-indexer
wget https://github.com/nyaruka/rp-indexer/releases/download/v${{ env.rpindexer-version }}/rp-indexer_${{ env.rpindexer-version }}_linux_amd64.tar.gz
tar -xvf rp-indexer_${{ env.rpindexer-version }}_linux_amd64.tar.gz rp-indexer
# fetch, extract and start mailroom
wget https://github.com/nyaruka/mailroom/releases/download/v${{ env.mailroom-version }}/mailroom_${{ env.mailroom-version }}_linux_amd64.tar.gz
tar -xvf mailroom_${{ env.mailroom-version }}_linux_amd64.tar.gz mailroom
./mailroom -db=postgres://temba:temba@localhost:5432/temba?sslmode=disable -redis=redis://localhost:6379/10 -log-level=info > mailroom.log &
- name: Initialize environment
run: |
poetry install
npm install
sudo npm install -g less
ln -s ${{ github.workspace }}/temba/settings.py.dev ${{ github.workspace }}/temba/settings.py
poetry run ./manage.py migrate
# fetch and extract rp-indexer
wget https://github.com/nyaruka/rp-indexer/releases/download/v${{ env.rpindexer-version }}/rp-indexer_${{ env.rpindexer-version }}_linux_amd64.tar.gz
tar -xvf rp-indexer_${{ env.rpindexer-version }}_linux_amd64.tar.gz rp-indexer
# fetch, extract and start mailroom
wget https://github.com/${{ github.repository_owner }}/mailroom/releases/download/v${{ env.mailroom-version }}/mailroom_${{ env.mailroom-version }}_linux_amd64.tar.gz
tar -xvf mailroom_${{ env.mailroom-version }}_linux_amd64.tar.gz mailroom
./mailroom -db=postgres://temba:temba@localhost:5432/temba?sslmode=disable -redis=redis://localhost:6379/10 -log-level=info > mailroom.log &
- name: Run pre-test checks
run: |
# test that everything is well formatted, no missing migrations etc
poetry run ./code_check.py --debug
# check we can collect and compress all static files
poetry run ./manage.py collectstatic --noinput --verbosity=0
poetry run ./manage.py compress --extension=".haml" --settings=temba.settings_compress
- name: Run pre-test checks
run: |
# test that everything is well formatted, no missing migrations etc
poetry run ./code_check.py --debug
# check we can collect and compress all static files
poetry run ./manage.py collectstatic --noinput --verbosity=0
poetry run ./manage.py compress --extension=".haml" --settings=temba.settings_compress
- name: Run tests
run: |
poetry run coverage run manage.py test --keepdb --noinput --verbosity=2
poetry run coverage report -i
poetry run coverage report -i --rcfile .coveragerc_todo
poetry run coverage xml
- name: Run tests
run: |
poetry run coverage run manage.py test --keepdb --noinput --verbosity=2
poetry run coverage report -i
poetry run coverage report -i --rcfile .coveragerc_todo
poetry run coverage xml
- name: Mailroom log
if: failure()
run: cat mailroom.log
- name: Mailroom log
if: failure()
run: cat mailroom.log

- name: Upload coverage
if: success()
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
- name: Upload coverage
if: success()
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
25 changes: 25 additions & 0 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "CLA Assistant"
on:
issue_comment:
types: [created]
pull_request_target:
types: [opened,closed,synchronize]

jobs:
CLAssistant:
runs-on: ubuntu-latest
steps:
- name: "CLA Assistant"
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
# Beta Release
uses: contributor-assistant/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PERSONAL_ACCESS_TOKEN : ${{ secrets.CLA_TOKEN }}
with:
path-to-signatures: 'signatures/version1/cla.json'
path-to-document: 'https://github.com/nyaruka/license/blob/main/TextIt_CLA.md'
branch: 'main'
allowlist: bot*
remote-organization-name: 'nyaruka'
remote-repository-name: 'legal'
33 changes: 33 additions & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Stale Manual

on:
workflow_dispatch:
inputs:
operations:
description: 'Number of operations'
default: "300"
required: true

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
operations-per-run: ${{ github.event.inputs.operations }}
stale-issue-label: 'inactive'
stale-issue-message: 'Without activity, this issue will be closed in 14 days.'
close-issue-message: 'This issue was closed for inactivity.'
stale-pr-message: 'Without activity, this PR will be closed in 14 days.'
close-pr-message: 'This PR was closed for inactivity.'
stale-pr-label: 'inactive'
days-before-pr-stale: 30
days-before-pr-close: 14
days-before-issue-stale: 30
days-before-issue-close: 14
33 changes: 33 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Close inactive issues and PRs

on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-label: 'inactive'
stale-issue-message: 'Without activity, this issue will be closed in 14 days.'
close-issue-message: 'This issue was closed for inactivity.'
stale-pr-message: 'Without activity, this PR will be closed in 14 days.'
close-pr-message: 'This PR was closed for inactivity.'
stale-pr-label: 'inactive'
days-before-pr-stale: 30
days-before-pr-close: 14
days-before-issue-stale: 30
days-before-issue-close: 14
Loading

0 comments on commit f2d03fd

Please sign in to comment.