Skip to content

chore(deps): update eslint packages (major) #5691

chore(deps): update eslint packages (major)

chore(deps): update eslint packages (major) #5691

Workflow file for this run

name: Django CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-24.04
# Use your self-built image as container for the entire job
container: ghcr.io/${{ github.repository }}/ci-base:latest
steps:
- uses: actions/checkout@v4
- name: Start PostgreSQL
run: |
sudo service postgresql start
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Cache node packages
uses: actions/cache@v4
env:
cache-name: cache-node-packages
with:
path: ~/.npm
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache node Modules
id: cache-node-modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node_modules-
- name: Cache uv packages
uses: actions/cache@v4
env:
cache-name: cache-uv-packages
with:
path: ~/.cache/uv
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/requirements/dev.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache testmon data
id: cache-testmon
uses: actions/cache@v4
with:
path: .testmondata
key: ${{ runner.os }}-testmon-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/requirements/dev.txt', 'adhocracy-plus/config/settings/*.py', 'pytest.ini') }}
restore-keys: |
${{ runner.os }}-testmon-${{ steps.setup-python.outputs.python-version }}-
- name: Checks
run: |
echo "node_modules cache hit: ${{ steps.cache-node-modules.outputs.cache-hit }}"
ls -la node_modules 2>/dev/null || echo "node_modules directory does not exist"
echo "testmon cache hit: ${{ steps.cache-testmon.outputs.cache-hit }}"
ls -la .testmondata || true
./scripts/a4-check.sh
- name: Install Python Dependencies
run: |
uv pip install -r requirements/dev.txt --system
uv pip install coveralls --system
- name: Run Tests
env:
PGPASSWORD: postgres
PGHOSTADDR: 127.0.0.1
run: |
python manage.py collectstatic > /dev/null
isort --diff -c adhocracy-plus tests
python manage.py makemigrations --dry-run --check --noinput
flake8 adhocracy-plus tests --exclude migrations,settings
if [ "${{ github.ref }}" = "refs/heads/main" ] && [ "${{ github.event_name }}" = "push" ]; then
py.test --ds=adhocracy-plus.config.settings.travis --cov
elif [ "${{ github.event_name }}" = "pull_request" ]; then
py.test --ds=adhocracy-plus.config.settings.travis --testmon --cov
fi
- name: Coveralls
env:
COVERALLS_SERVICE_NAME: github-actions
GITHUB_TOKEN: ${{ secrets.COV }}
run: |
git config --global --add safe.directory /__w/adhocracy-plus/adhocracy-plus
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
coveralls
- name: Install NPM Dependencies
run: |
if [ -d node_modules ] && [ -f package-lock.json ]; then
echo "node_modules cache hit - skipping npm ci"
else
echo "node_modules cache miss - running npm ci"
npm ci --prefer-offline --no-audit --no-fund
fi
- name: Build NPM
run: |
npm run build
- name: Run Frontend Tests
run: |
npm test
npm run lint
- name: Deploy
if: github.ref == 'refs/heads/main'
env:
TRAVIS_SSH_SECRET: ${{ secrets.DEPLOY }}
run: |
./scripts/deploy.sh