update python version to 3.11 #48
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
| # link to github action help goes here | |
| name: test pvfree | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_DB: travis_ci_test | |
| POSTGRES_USER: travis | |
| POSTGRES_PASSWORD: ${{ secrets.TRAVIS_PASSWORD }} | |
| # Set health checks to wait until postgres has started | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| # Downloads a copy of the code in your repository before running CI tests | |
| - name: Check out repository code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python version | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Create and start virtual environment | |
| run: | | |
| python -m venv venv | |
| source venv/bin/activate | |
| - name: Install dependencies | |
| run: pip install -r requirements.txt | |
| - name: Run tests | |
| env: | |
| # secrets do not work in PRs from forks | |
| TRAVIS_PASSWORD: ${{ secrets.TRAVIS_PASSWORD }} | |
| SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
| # The hostname used to communicate with the PostgreSQL service container | |
| POSTGRES_HOST: localhost | |
| # The default PostgreSQL port | |
| POSTGRES_PORT: 5432 | |
| run: DJANGO_SETTINGS_MODULE=pvfree.settings.travis pytest -vv |