Skip to content

update gitignore and add pnpm lock file #3

update gitignore and add pnpm lock file

update gitignore and add pnpm lock file #3

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Factory Tests
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [master]
pull_request:
branches: [master]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
node:
if: github.repository == 'bot-ts/framework'
name: Test on Node.js v22
runs-on: ubuntu-latest
strategy:
matrix:
package-manager: [npm, yarn, pnpm]
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 22
- name: Install package manager
run: |
if [ "${{ matrix.package-manager }}" != "npm" ]; then
npm install -g ${{ matrix.package-manager }}@latest
else
echo "npm is already installed"
fi
- name: Generate lockfile
run: |
rm -f bun.lockb
if [ "${{ matrix.package-manager }}" == "npm" ]; then
cp lockfiles/package-lock.json ./
elif [ "${{ matrix.package-manager }}" == "yarn" ]; then
cp lockfiles/yarn.lock ./
elif [ "${{ matrix.package-manager }}" == "pnpm" ]; then
cp lockfiles/pnpm-lock.yaml ./
fi
- name: Install dependencies
run: |
if [ "${{ matrix.package-manager }}" == "npm" ]; then
npm ci
elif [ "${{ matrix.package-manager }}" == "yarn" ]; then
yarn install --frozen-lockfile
elif [ "${{ matrix.package-manager }}" == "pnpm" ]; then
pnpm install --frozen-lockfile
fi
- name: Check typings
run: tsc --noEmit
- name: Build JS
run: ${{ matrix.package-manager }} build
- name: Start the bot
run: node tests/index.test.js
bun:
name: Test on Bun v1.1.34
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.1.34
- name: Install dependencies
run: bun install
- name: Start the bot
run: bun run tests/index.test.js
deno:
name: Test on Deno v1.17.2
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Deno
uses: denolib/setup-deno@v2
with:
deno-version: 1.17.2
- name: Install dependencies
run: deno cache tests/index.test.ts
- name: Start the bot
run: deno tests/index.test.ts