Skip to content

Build(deps): Bump pnpm/action-setup from 3 to 4 #747

Build(deps): Bump pnpm/action-setup from 3 to 4

Build(deps): Bump pnpm/action-setup from 3 to 4 #747

Workflow file for this run

name: test
on:
push:
branches: [master, canary]
pull_request:
branches: [master, canary]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
env:
MYSQL_DB_DATABASE: keyv_test
MYSQL_DB_USER: root
MYSQL_DB_PASSWORD: root
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Start Redis
uses: supercharge/redis-github-action@1.8.0
# - name: Start PostgreSQL
# uses: harmon758/postgresql-action@v1
# with:
# postgresql version: '11'
# postgresql password: postgres
# postgresql user: postgres
# postgresql db: keyv_test
- name: Start MongoDB
uses: supercharge/mongodb-github-action@v1.10.0
- name: Start MySQL
run: |
sudo systemctl start mysql.service
mysql -e 'CREATE DATABASE ${{ env.MYSQL_DB_DATABASE }}' -u${{ env.MYSQL_DB_USER }} -p${{ env.MYSQL_DB_PASSWORD }}
mysql -e 'SET GLOBAL max_connections = 300;' -u${{ env.MYSQL_DB_USER }} -p${{ env.MYSQL_DB_PASSWORD }}
- name: Start PostgreSQL on Ubuntu
run: |
sudo systemctl start postgresql.service
pg_isready
- name: Setup PostgreSQL for ava tests
run: |
sudo -u postgres psql --command="alter system set max_connections = 300;"
sudo -u postgres psql --command="CREATE DATABASE keyv_test;"
sudo -u postgres psql --command="ALTER ROLE postgres WITH PASSWORD 'postgres';" --command="\du"
sudo systemctl restart postgresql.service
pg_isready
- name: Setup PNPM
uses: pnpm/action-setup@v4
with:
version: latest
run_install: true
- run: pnpm test
- name: Report
run: npx c8 report --reporter=text-lcov > coverage/lcov.info
- name: Coverage
uses: coverallsapp/github-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}