Skip to content

Commit

Permalink
Add security workflows, combine test and lint workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
zliang-akamai committed Dec 18, 2024
1 parent e553f95 commit f2fb55b
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 30 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/unit-tests.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Unit Tests
name: Continues Integration

on:
workflow_dispatch: null
push:
pull_request:

jobs:
run-tests:
run-tests-lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ '3.9','3.10','3.11', '3.12' ]
python-version: [ "3.9","3.10","3.11", "3.12"]
steps:
- name: checkout repo
uses: actions/checkout@v4
Expand All @@ -20,12 +20,11 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: install or update Python build system
run: python3 -m pip install -U wheel setuptools certifi pip

- name: install the package with dev tools
run: make dev-install

- name: run unit tests
run: make unit-test

- name: run linter
run: make lint
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 Advanced"

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
schedule:
- cron: "0 13 * * 5"

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write

strategy:
fail-fast: false
matrix:
include:
- language: python
build-mode: none
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
19 changes: 19 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Dependency review'
on:
pull_request:
branches: [ "main" ]

permissions:
contents: read
pull-requests: write

jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout repository'
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
with:
comment-summary-in-pr: on-failure
24 changes: 0 additions & 24 deletions .github/workflows/lint.yml

This file was deleted.

0 comments on commit f2fb55b

Please sign in to comment.