Add toggle for feature. #517
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test | |
on: | |
push: | |
pull_request: | |
permissions: write-all | |
jobs: | |
sourcemod-plugin: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup SourcePawn Compiler | |
uses: rumblefrog/setup-sp@master | |
with: | |
version: "1.12.x" | |
- name: Ensure plugin builds | |
working-directory: ./sourcemod/scripting | |
run: spcomp -i"./include/" gbans.sp -o ../plugins/gbans.smx | |
lint-ts: | |
runs-on: ubuntu-latest | |
env: | |
GBANS_GENERAL_STEAM_KEY: ${{ secrets.GBANS_GENERAL_STEAM_KEY }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Setup nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
cache: 'pnpm' | |
cache-dependency-path: 'frontend/pnpm-lock.yaml' | |
- name: Install modules | |
working-directory: ./frontend | |
run: pnpm install --frozen-lockfile --strict-peer-dependencies | |
- name: Prettier | |
run: make lint_ts | |
- name: TypeScript | |
run: make typecheck_ts | |
lint-golangci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 'stable' | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: 'latest' | |
args: --timeout=10m | |
staticcheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: 'stable' | |
- run: go install honnef.co/go/tools/cmd/staticcheck@latest | |
- run: make static | |
backend-test: | |
needs: [lint-golangci, staticcheck] | |
runs-on: ubuntu-latest | |
env: | |
GBANS_GENERAL_STEAM_KEY: ${{ secrets.GBANS_GENERAL_STEAM_KEY }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Backend tests | |
run: make test-go | |
frontend-test: | |
needs: [lint-ts] | |
runs-on: ubuntu-latest | |
env: | |
GBANS_GENERAL_STEAM_KEY: ${{ secrets.GBANS_GENERAL_STEAM_KEY }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
run_install: false | |
- name: Setup nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.x' | |
cache: 'pnpm' | |
cache-dependency-path: 'frontend/pnpm-lock.yaml' | |
- name: Install modules | |
working-directory: ./frontend | |
run: pnpm install --frozen-lockfile --strict-peer-dependencies | |
- name: Frontend tests | |
run: make test-ts |