Skip to content

Add test for 3.7 compatible syntax #661

Add test for 3.7 compatible syntax

Add test for 3.7 compatible syntax #661

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '7 5 * * *'
defaults:
run:
shell: bash
env:
FORCE_COLOR: "1"
jobs:
lint:
runs-on: ubuntu-latest
name: "Lint"
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set Up Python 3.10
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Lint the code
run: |
python -m pip install nox
nox -s lint
test:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
python-version: ["3.10", "3.11", "3.12-dev"]
runs-on: ${{ matrix.os }}
name: ${{ fromJson('{"macos-latest":"macOS","windows-latest":"Windows","ubuntu-latest":"Ubuntu"}')[matrix.os] }} Python ${{ matrix.python-version }}
continue-on-error: false
timeout-minutes: 10
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.x
- name: Install mkcert on macOS
if: runner.os == 'macOS'
run: |
go install filippo.io/[email protected]
# for non-interactive install of root CA
sudo security authorizationdb write com.apple.trust-settings.admin allow
mkcert -install
- name: Install mkcert on Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
go install filippo.io/[email protected]
sudo apt-get install libnss3-tools
mkcert -install
- name: Run tests
run: |
python -m pip install nox
nox -s test
integration-pip:
runs-on: ubuntu-latest
name: Integration pip
timeout-minutes: 10
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
path: truststore
- name: Checkout pypa/pip
uses: actions/checkout@v3
with:
repository: pypa/pip
path: pip
- name: Setup Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.11"
- name: Patch tests to install local copy of truststore
working-directory: "${{ github.workspace }}/pip"
run: |
sed -i 's|script.pip("install", "truststore")|script.pip("install", "${{ github.workspace }}/truststore")|' tests/functional/test_truststore.py
- name: Run tests
working-directory: "${{ github.workspace }}/pip"
run: |
python -m pip install nox
nox -s test-3.11 -- \
-m integration \
tests/functional/test_truststore.py