chore: workaround some GH problem #944
This file contains 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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
test: | |
environment: Env_for_Actions | |
# The type of runner that the job will run on | |
runs-on: [ubuntu-latest] | |
# Virgin container | |
container: ubuntu:18.04 | |
# https://github.com/actions/setup-node/issues/922 | |
# https://github.com/actions/runner/issues/2906 | |
env: | |
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: 'true' | |
# Service containers to run with `container-job` | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: pgvector/pgvector:pg14 | |
# Provide the password for postgres | |
env: | |
POSTGRES_PASSWORD: postgres12 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# node is needed by codecov | |
- run: apt-get update | |
- run: apt-get install -y curl | |
- run: curl -fsSL https://deb.nodesource.com/setup_16.x | bash - | |
- run: apt-get install -y nodejs | |
# git is needed by codecov | |
- run: apt-get install -y git | |
# python & psql (for the test DB) from repo, same as prod docker | |
- run: apt-get install | |
python3.8 python3-venv python3.8-dev python3.8-venv | |
postgresql-client-10 libpq-dev | |
gcc make file cython3 | |
--no-install-recommends --yes | |
- run: python3.8 -m venv /venv | |
- run: PATH=/venv/bin pip3 install --upgrade pip wheel | |
# Checkout. note: @v4 need node20 which is NOK on ubuntu 18 | |
- uses: actions/checkout@v2 | |
# Run both tests and coverage | |
- run: PATH=/venv/bin:$PATH pip3 install tox==3.24.3 | |
- name: Run tox in QA | |
working-directory: ./QA/py | |
run: | | |
PATH=/venv/bin PYTHONPATH=. tox | |
env: | |
# The hostname used to communicate with the PostgreSQL service container | |
POSTGRES_HOST: postgres | |
# The default PostgreSQL port | |
POSTGRES_PORT: 5432 | |
# - name: Upload coverage report | |
# # Code coverage. note: @v4 need node20 which is NOK on ubuntu 18 | |
# uses: codecov/codecov-action@v2 | |
# with: | |
# token: ${{ secrets.CODECOV_TOKEN }} | |
# verbose: true # optional (default = false) |