Skip to content

Commit

Permalink
feat: add new test workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
0x1NotMe committed Oct 22, 2024
1 parent d7aca01 commit c211906
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/golang-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Golang Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
name: Run Golang Tests
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.19', '1.20']

steps:
- uses: actions/checkout@v4

- name: Set up Go ${{ matrix.go-version }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}

- name: Install dependencies
working-directory: ./golang
run: go mod download

- name: Copy config file
working-directory: ./golang
run: make copy-config

- name: Run tests
working-directory: ./golang
run: make test

- name: Run lint
working-directory: ./golang
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
make lint
- name: Run all checks
working-directory: ./golang
run: make check
40 changes: 40 additions & 0 deletions .github/workflows/typescript-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: TypeScript Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
name: Run TypeScript Tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v4

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

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.9.0

- name: Install dependencies
working-directory: ./typescript
run: pnpm install --frozen-lockfile

- name: Build
working-directory: ./typescript
run: pnpm build

- name: Run tests
working-directory: ./typescript
run: pnpm test

0 comments on commit c211906

Please sign in to comment.