Run tests on Github
1 file changed,
+37
−0
.github/workflows/test.yml+37 −0
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml| new file mode 100644 |
| index 0000000..c759704 |
| --- /dev/null |
| +++ b/.github/workflows/test.yml |
| @@ -0,0 +1,37 @@ |
| +name: Tests |
| + |
| +on: |
| + push: |
| + branches: [ main ] |
| + pull_request: |
| + branches: [ main ] |
| + |
| +jobs: |
| + test: |
| + runs-on: ubuntu-latest |
| + strategy: |
| + matrix: |
| + go-version: ['1.23'] |
| + node-version: ['20'] |
| + |
| + steps: |
| + - uses: actions/checkout@v4 |
| + |
| + - name: Set up Go |
| + uses: actions/setup-go@v5 |
| + with: |
| + go-version: ${{ matrix.go-version }} |
| + |
| + - name: Set up Node.js |
| + uses: actions/setup-node@v4 |
| + with: |
| + node-version: ${{ matrix.node-version }} |
| + |
| + - name: Run Go tests |
| + run: go test ./... |
| + |
| + - name: Run JavaScript tests |
| + run: npm test |
| + |
| + - name: Check JavaScript syntax |
| + run: node --check web/static/chat.js |