Skip to content

Fix bare mode resolvers for Prefix and NamingConvention transforms #38

Fix bare mode resolvers for Prefix and NamingConvention transforms

Fix bare mode resolvers for Prefix and NamingConvention transforms #38

Workflow file for this run

name: test
on:
pull_request:
branches:
- master
push:
branches:
- master
env:
CI: true
NODE_TLS_REJECT_UNAUTHORIZED: 0
GH_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LC_ALL: en-US
REDIS_HOST: localhost
REDIS_PORT: 6379
jobs:
lint:
uses: the-guild-org/shared-config/.github/workflows/lint.yml@main
with:
script: yarn prettier:check && yarn ci:lint
secrets:
githubToken: ${{ secrets.GITHUB_TOKEN }}
unit:
name: unit / node ${{matrix.node-version}}
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20, 21]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Required Libraries
run: sudo apt update && sudo apt install -y libcurl4-openssl-dev libssl-dev
- uses: the-guild-org/shared-config/setup@main
continue-on-error: true
name: setup env
with:
nodeVersion: ${{matrix.node-version}}
- name: Cache Jest
uses: actions/cache@v3
with:
path: .cache/jest
key: ${{ runner.os }}-${{matrix.node-version}}-jest-unit-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{runner.os}}-${{matrix.node-version}}-jest-unit-
- name: Remove node-libcurl
run: rm -rf node_modules/node-libcurl
- name: Run Tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: yarn test
unit-leaks:
name: unit / leak / node ${{matrix.node-version}}
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Required Libraries
run: sudo apt update && sudo apt install -y libcurl4-openssl-dev libssl-dev
- name: Use Node
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Remove node-libcurl
run: node scripts/remove-node-libcurl.cjs
- uses: the-guild-org/shared-config/setup@main
continue-on-error: true
name: setup env
with:
nodeVersion: ${{matrix.node-version}}
- name: Cache Jest
uses: actions/cache@v3
with:
path: .cache/jest
key: ${{ runner.os }}-${{matrix.node-version}}-jest-unit-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{runner.os}}-${{matrix.node-version}}-jest-unit-
- name: Remove node-libcurl
run: rm -rf node_modules/node-libcurl
- name: Run Tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: yarn test:leak
integration:
name: integration / node ${{matrix.node-version}}
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20, 21]
# Service containers to run with `runner-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: docker
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
mysql:
image: genschsa/mysql-employees
env:
MYSQL_ROOT_PASSWORD: passwd
ports:
- 33306:3306
options:
--health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s
--health-retries=3
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
# Maps port 6379 on service container to the host
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Required Libraries
run: sudo apt update && sudo apt install -y libcurl4-openssl-dev libssl-dev
- uses: the-guild-org/shared-config/setup@main
continue-on-error: true
name: setup env
with:
nodeVersion: ${{matrix.node-version}}
- name: Cache Jest
uses: actions/cache@v3
with:
path: .cache/jest
key:
${{ runner.os }}-${{matrix.node-version}}-jest-integration-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{runner.os}}-${{matrix.node-version}}-jest-integration-
- name: Download Postgres Dump
run:
'curl
https://raw.githubusercontent.com/morenoh149/postgresDBSamples/master/worldDB-1.0/world.sql
-o /tmp/backup.sql'
- name: Load Postgres Data
uses: tj-actions/[email protected]
with:
database_url: 'postgres://postgres:docker@localhost:5432/postgres'
backup_file: '/tmp/backup.sql'
- name: Build
run: yarn build
- name: Build Test Artifacts
run: yarn build-test-artifacts
- name: Test
run: yarn test:integration -u
integration-leak:
name: integration / leak / node ${{matrix.node-version}}
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18]
# Service containers to run with `runner-job`
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_PASSWORD: docker
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
mysql:
image: genschsa/mysql-employees
env:
MYSQL_ROOT_PASSWORD: passwd
ports:
- 33306:3306
options:
--health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s
--health-retries=3
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
ports:
# Maps port 6379 on service container to the host
- 6379:6379
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Required Libraries
run: sudo apt update && sudo apt install -y libcurl4-openssl-dev libssl-dev
- name: Use Node
uses: actions/setup-node@master
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- name: Remove node-libcurl
run: node scripts/remove-node-libcurl.cjs
- uses: the-guild-org/shared-config/setup@main
continue-on-error: true
name: setup env
with:
nodeVersion: ${{matrix.node-version}}
- name: Cache Jest
uses: actions/cache@v3
with:
path: .cache/jest
key:
${{ runner.os }}-${{matrix.node-version}}-jest-integration-leak-${{
hashFiles('yarn.lock') }}
restore-keys: |
${{runner.os}}-${{matrix.node-version}}-jest-integration-leak-
- name: Download Postgres Dump
run:
'curl
https://raw.githubusercontent.com/morenoh149/postgresDBSamples/master/worldDB-1.0/world.sql
-o /tmp/backup.sql'
- name: Load Postgres Data
uses: tj-actions/[email protected]
with:
database_url: 'postgres://postgres:docker@localhost:5432/postgres'
backup_file: '/tmp/backup.sql'
- name: Build
run: yarn build
- name: Build Test Artifacts
run: yarn build-test-artifacts
- name: Remove node-libcurl
run: rm -rf node_modules/node-libcurl
- name: Run Tests
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: yarn test:integration:leak -u
integrity-check:
name: integrity-check / node ${{matrix.node-version}}
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20, 21]
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Install Required Libraries
run: sudo apt update && sudo apt install -y libcurl4-openssl-dev libssl-dev
- uses: the-guild-org/shared-config/setup@main
continue-on-error: true
name: setup env
with:
nodeVersion: ${{matrix.node-version}}
- name: Build
run: yarn build
- name: Node.js integrity check
run: yarn bob check