Skip to content

Commit

Permalink
ACTIONS: Add test suite workflow and codeql analysis workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cian911 committed Dec 18, 2021
1 parent a395253 commit a4db40b
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '26 17 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
Empty file added .github/workflows/release.yml
Empty file.
35 changes: 35 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test Suite

on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
paths:
- "cmd/**"
- "event/**"
- "utils/**"
- "watcher/**"
- "go.*"
- ".github/workflows/test.yml"

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup
uses: actions/setup-go@v2
with:
go-version: '~1.17'
- name: Install Dependencies
run: |
go install github.com/rakyll/gotest@latest
go install golang.org/x/lint/golint@latest
- name: Lint
run: |
make lint-all
- name: Test
run: |
make test-all

0 comments on commit a4db40b

Please sign in to comment.