UIs for managing member orgs and invitations #1157
This file contains hidden or 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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| env: | |
| DJANGO_SECRET_KEY: ${{secrets.DJANGO_SECRET_KEY}} | |
| DJANGO_SETTINGS_MODULE: config.settings.test | |
| MUCKROCK_TOKEN: token | |
| STRIPE_SECRET_KEY: ${{secrets.STRIPE_SECRET_KEY}} | |
| STRIPE_PUB_KEY: ${{secrets.STRIPE_PUB_KEY}} | |
| STRIPE_WEBHOOK_SECRET: ${{secrets.STRIPE_WEBHOOK_SECRET}} | |
| MAILGUN_ACCESS_KEY: "" | |
| USE_DOCKER: false | |
| jobs: | |
| migration-check: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check for migration conflicts | |
| run: .github/scripts/check_migration_conflicts.sh | |
| check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: "pip" # caching pip dependencies | |
| - name: Install | |
| run: | | |
| pip install -r requirements/local.txt | |
| - name: Lint | |
| run: pylint squarelet | |
| - name: Sort | |
| run: isort --check-only --diff squarelet config/urls.py config/settings | |
| - name: Format | |
| run: black --check squarelet --exclude migrations && black --check config/urls.py && black --check config/settings | |
| test: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_USER: test | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: squarelet | |
| # Set health checks to wait until postgres has started | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| # Maps tcp port 5432 on service container to the host | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| cache: "pip" # caching pip dependencies | |
| - name: Install | |
| run: | | |
| pip install -r requirements/local.txt | |
| - name: Pytest | |
| run: pytest squarelet | |
| env: | |
| # use the credentials for the service container | |
| DATABASE_URL: postgresql://test:postgres@localhost:5432/squarelet | |
| frontend-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: ".node-version" | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run frontend tests | |
| run: npm run test:ci |