Skip to content

fix #67

fix #67 #167

Workflow file for this run

name: "API Wrapper"
on:
push:
branches:
- v10
paths:
- "wrapper/**"
- "disgo.go"
- "go.mod"
- "go.sum"
- "go.work"
- "go.work.sum"
pull_request:
types:
- opened
- synchronize
branches:
- v10
paths:
- "wrapper/**"
- "disgo.go"
- "go.mod"
- "go.sum"
- "go.work"
- "go.work.sum"
jobs:
sca-lint:
name: Static Code Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.53.3
args: ./wrapper/...
test-unit:
needs: sca-lint
name: Unit Tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Run Unit Tests
run: go test ./wrapper/tests/unit
test-integration:
needs: test-unit
name: Integration Tests
environment: testing
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Run Integration Tests
env:
TOKEN: ${{ secrets.TOKEN }}
APPID: ${{ secrets.APPID }}
COVERAGE_TEST_TOKEN: ${{ secrets.COVERAGE_TEST_TOKEN }}
COVERAGE_TEST_GUILD: ${{ secrets.COVERAGE_TEST_GUILD }}
COVERAGE_TEST_CATEGORY: ${{ secrets.COVERAGE_TEST_CATEGORY }}
run: go test ./wrapper/tests/integration -race