v1.4.2 actualizo versiones. #36
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 workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
name: Node.js CI | |
# siguiendo el ejemplo de https://docs.github.com/es/actions/using-containerized-services/creating-postgresql-service-containers | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x, 21.x] | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_DB: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_USER: postgres | |
POSTGRES_PORT: 5432 | |
ports: | |
- 5432:5432 | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install DB | |
run: | | |
pwd | |
psql -d postgresql://postgres:postgres@localhost/postgres -c 'create user test_user password $$test_pass$$;' | |
psql -d postgresql://postgres:postgres@localhost/postgres -c 'create user test_super superuser password $$super_pass$$;' | |
psql -d postgresql://postgres:postgres@localhost/postgres -c 'create database test_db owner test_user;' | |
psql -d postgresql://postgres:postgres@localhost/postgres -c 'grant pg_read_server_files to test_user;' | |
chmod -v a+r test/fixtures/many-sep-lines.txt | |
chmod -v a+r /home/runner/work/pg-promise-strict/pg-promise-strict/test/fixtures/many-sep-lines.txt | |
export FILE4TEST=`mktemp` | |
cp /home/runner/work/pg-promise-strict/pg-promise-strict/test/fixtures/many-sep-lines.txt $FILE4TEST | |
chmod -v a+r $FILE4TEST | |
ls -cal | |
- run: npm ci | |
- run: npm run build --if-present | |
- run: npm test |