Skip to content

Commit

Permalink
devel
Browse files Browse the repository at this point in the history
  • Loading branch information
mgarapich committed Dec 27, 2023
1 parent 6b9d0fa commit 6ec2c85
Show file tree
Hide file tree
Showing 13 changed files with 1,110 additions and 55 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: test

on:
push:
branches:
- 'master'
- '*.*.*'
- 'renovate/**'
tags:
- '*.*.*'
pull_request:
branches:
- 'master'
- '*.*.*'

jobs:
unit-test:
name: unit
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [lts, 20.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Run unit test
run: pnpm test

build:
name: build
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [lts, 20.x]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "@tf2pickup-org/serveme-tf-client",
"version": "1.0.0",
"description": "A serveme.tf API client",
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"build": "tsc --project tsconfig.build.json",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "vitest"
},
"keywords": [
"serveme",
Expand All @@ -19,7 +20,8 @@
"devDependencies": {
"@types/node": "^20.10.5",
"prettier": "^3.1.1",
"typescript": "^5.3.3"
"typescript": "^5.3.3",
"vitest": "^1.1.0"
},
"dependencies": {
"axios": "^1.6.2",
Expand Down
Loading

0 comments on commit 6ec2c85

Please sign in to comment.