Bump actions/setup-python from 5 to 6 #217
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: Docker Image CI | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:14 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup env | |
| run: | | |
| rm sample.env | |
| touch sample.env | |
| echo DB_HOST=postgres >> sample.env | |
| echo DB_TEST_NAME=test >> sample.env | |
| echo DB_TEST_USER=postgres >> sample.env | |
| echo DB_TEST_PASSWORD=postgres >> sample.env | |
| echo DB_TEST_HOST=postgres >> sample.env | |
| echo DB_TEST_PORT=5432 >> sample.env | |
| - name: Build the Docker image | |
| run: docker build . --file .build/Dockerfile --tag fastapi-piccolo:dev | |
| # - name: Setup postgres | |
| # run: | | |
| # export PGPASSWORD=postgres | |
| # psql -h localhost -c 'CREATE DATABASE test;' -U postgres | |
| # - name: Run tests | |
| # run: docker run fastapi-piccolo:dev piccolo tester run | |
| # - name: Upload coverage | |
| # uses: codecov/codecov-action@v1 | |