test-rollbar command #4870
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Django | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
build-and-test-django: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Configure sysctl limits | |
run: | | |
sudo swapoff -a | |
sudo sysctl -w vm.swappiness=1 | |
sudo sysctl -w fs.file-max=262144 | |
sudo sysctl -w vm.max_map_count=262144 | |
- uses: getong/elasticsearch-action@v1.3 | |
with: | |
elasticsearch version: '7.7.0' | |
host port: 9200 | |
container port: 9200 | |
host node port: 9300 | |
node port: 9300 | |
discovery type: 'single-node' | |
- name: Redis Server in GitHub Actions | |
uses: supercharge/redis-github-action@1.8.0 | |
with: | |
# Redis version to use | |
redis-version: '5.0.5' | |
- name: Setup PostgreSQL | |
uses: Harmon758/postgresql-action@v1.0.0 | |
with: | |
# Version of PostgreSQL to use | |
postgresql version: '12' | |
postgresql db: peterbecom | |
postgresql user: user | |
postgresql password: secret | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
cache: 'yarn' | |
- name: Cache node_modules | |
uses: actions/cache@v4 | |
id: cached-node_modules | |
with: | |
path: | | |
node_modules | |
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}-${{ hashFiles('.github/workflows/python.yml') }} | |
- name: Install yarn packages | |
if: steps.cached-node_modules.outputs.cache-hit != 'true' | |
run: yarn --frozen-lockfile | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
- name: Cache pip | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip wheel --progress-bar off | |
pip install -r requirements.txt --progress-bar off | |
- name: Run Lints | |
run: ruff check . | |
- name: Run Tests | |
run: | | |
./scripts/ci-test.sh |