npmono: improve bump checks and naming and messages #1715
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
name: CI | |
on: | |
push: {} | |
pull_request: {} | |
env: | |
POSTGRES_PSQL_COMMAND: docker exec -i postgres_github_actions psql | |
jobs: | |
build: | |
if: github.event_name == 'push' || github.event.pull_request.base.repo.url != github.event.pull_request.head.repo.url | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:13 | |
env: | |
PGPORT: '5432' | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
--name postgres_github_actions | |
ports: | |
- 5432:5432 | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: check psql | |
run: | | |
echo 'select 123 as test_column \gdesc' | docker exec -i postgres_github_actions psql "postgresql://postgres:postgres@localhost:5432/postgres" -f - | grep 'test_column | integer' | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.x | |
- name: Install python dependencies (for testing migra) | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools | |
pip install migra | |
pip install psycopg2-binary | |
migra --help | grep 'Generate a database migration' | |
migra EMPTY postgresql://postgres:postgres@localhost:5432/postgres --unsafe || echo 'migra exited with an error code - check output' | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: corepack enable | |
- run: pnpm install | |
- run: pnpm build | |
- run: pnpm test |