Skip to content

Only trust last entry in x-forwarded-for by default #3421

Only trust last entry in x-forwarded-for by default

Only trust last entry in x-forwarded-for by default #3421

Workflow file for this run

---
name: CI
on:
pull_request:
push:
jobs:
tox:
name: django-ansible-base - ${{ matrix.tests.env }}
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
fail-fast: false
matrix:
tests:
- env: check
python-version: "3.11"
sonar: false
- env: py39
python-version: "3.9"
sonar: false
- env: py310
python-version: "3.10"
sonar: false
- env: py311
python-version: "3.11"
sonar: true
- env: py311sqlite
python-version: "3.11"
sonar: false
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- name: Install build requirements
run: sudo apt-get update && sudo apt-get install -y libsasl2-dev libldap2-dev libssl-dev libxmlsec1-dev
- name: Install python ${{ matrix.tests.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.tests.python-version }}
- name: Install tox
run: pip${{ matrix.tests.python-version }} install tox
- name: Run tox
run: |
echo "::remove-matcher owner=python::" # Disable annoying annotations from setup-python
tox -e ${{ matrix.tests.env }}
- name: Inject PR number into coverage.xml
if: matrix.tests.sonar
run: sed -i '2i <!-- PR ${{ github.event.number }} -->' coverage.xml
- name: Upload coverage as artifact
uses: actions/upload-artifact@v2
if: matrix.tests.sonar
with:
name: coverage
path: coverage.xml
- name: SonarCloud Scan (on push)
uses: SonarSource/sonarcloud-github-action@master
if: matrix.tests.sonar && github.event_name == 'push' && github.repository == 'ansible/django-ansible-base'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}