Translations update from Weblate #2534
Workflow file for this run
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
name: Froide CI | |
on: | |
push: | |
pull_request: | |
branches: [main] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.x | |
cache: 'pip' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install .[lint] | |
yarn install | |
- name: Run flake8 | |
run: flake8 froide --statistics | |
- name: Run black | |
run: black --check froide | |
- name: Run isort | |
run: isort --check froide | |
- name: Run eslint | |
run: yarn lint | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.10'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install system-level dependencies | |
run: sudo apt-get update && sudo apt-get install libxml2-dev libxslt1-dev python3-dev libgdal-dev gdal-bin libmagic-dev libmagickwand-dev libpoppler-cpp-dev | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip~=22.0.1 pip-tools | |
pip-sync requirements-test.txt | |
pip install -e . | |
yarn install | |
- name: Build frontend | |
run: yarn run build | |
- name: Run flake8 and tests | |
run: make testci | |
env: | |
DATABASE_URL: postgis://postgres:postgres@localhost/froide | |
services: | |
postgres: | |
image: postgis/postgis:14-3.3 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: froide | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.5.1 | |
options: -e "discovery.type=single-node" --expose 9200 --health-cmd "curl localhost:9200/_cluster/health" --health-interval 10s --health-timeout 5s --health-retries 10 | |
ports: | |
- '9200:9200' | |
testui: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8'] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
- name: Install system-level dependencies | |
run: sudo apt-get update && sudo apt-get install libxml2-dev libxslt1-dev python3-dev libgdal-dev gdal-bin python3-gdal libmagic-dev libmagickwand-dev libpoppler-cpp-dev | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip~=22.0.1 pip-tools | |
pip-sync requirements-test.txt | |
playwright install --with-deps chromium | |
pip install -e . | |
yarn install | |
- name: Build frontend | |
run: yarn run build | |
- name: Run in-browser tests | |
run: make testui | |
env: | |
DATABASE_URL: postgis://postgres:postgres@localhost/froide | |
DJANGO_TEST_SELENIUM_DRIVER: http://localhost:4444/wd/hub#chrome_headless | |
services: | |
postgres: | |
image: postgis/postgis:12-3.0 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: froide | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:7.15.0 | |
options: -e "discovery.type=single-node" --expose 9200 --health-cmd "curl localhost:9200/_cluster/health" --health-interval 10s --health-timeout 5s --health-retries 10 | |
ports: | |
- '9200:9200' |