Skip to content

Commit be26785

Browse files
Migrate from LGTM.com to GitHub code analysis (#361)
* Migrate from LGTM.com to GitHub code analysis LGTM.com is being deprecated and replaced by GitHub code analysis: https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/ * Remove the deprecated `.lgtm.yml` configuration file. * Initialize a configuration file `.github/workflows/codeql-analysis.yml` using the template provided in the GitHub Action documentation: https://github.com/github/codeql-action#usage * Migrate from LGTM.com to GitHub code analysis LGTM.com is being deprecated and replaced by GitHub code analysis: https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/ * Adapt the template in `.github/workflows/codeql-analysis.yml` to this specific package. * Add tomli, setuptools might need it to parse TOML
1 parent 088434e commit be26785

File tree

3 files changed

+63
-18
lines changed

3 files changed

+63
-18
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: "Code Scanning - Action"
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
schedule:
9+
# ┌───────────── minute (0 - 59)
10+
# │ ┌───────────── hour (0 - 23)
11+
# │ │ ┌───────────── day of the month (1 - 31)
12+
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
13+
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
14+
# │ │ │ │ │
15+
# │ │ │ │ │
16+
# │ │ │ │ │
17+
# * * * * *
18+
- cron: '22 2 * * 5'
19+
20+
jobs:
21+
CodeQL-Build:
22+
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
23+
runs-on: ubuntu-latest
24+
25+
permissions:
26+
# required for all workflows
27+
security-events: write
28+
29+
# only required for workflows in private repositories
30+
actions: read
31+
contents: read
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v3
36+
37+
# Initializes the CodeQL tools for scanning.
38+
- name: Initialize CodeQL
39+
uses: github/codeql-action/init@v2
40+
with:
41+
languages: python
42+
# languages: python, cpp
43+
# queries: +security-extended
44+
45+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
46+
# If this step fails, then you should remove it and run the build manually (see below).
47+
- name: Autobuild
48+
uses: github/codeql-action/autobuild@v2
49+
50+
# ℹ️ Command-line programs to run using the OS shell.
51+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
52+
53+
# ✏️ If the Autobuild fails above, remove it and uncomment the following
54+
# three lines and modify them (or add more) to build your code if your
55+
# project uses a compiled language
56+
57+
#- run: |
58+
# make bootstrap
59+
# make release
60+
61+
- name: Perform CodeQL Analysis
62+
uses: github/codeql-action/analyze@v2

.lgtm.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=40.8.0", "wheel", "Cython", "py-cpuinfo"]
2+
requires = ["setuptools>=40.8.0", "setuptools_scm[toml]>=6.2", "Cython", "py-cpuinfo"]
33
build-backend = "setuptools.build_meta:__legacy__"
44

55
[tool.codespell]

0 commit comments

Comments
 (0)