Skip to content

Commit 7c3bc80

Browse files
authored
πŸ‘· build: create codeql.yml (#248)
* πŸ‘· build: create codeql.yml * πŸ“ docs: update README.md Include CodeQL badge * build: update test.yml Only run tests when changes are made to: - tests/ - plotly_resampler/ - poetry.lock
1 parent b712c67 commit 7c3bc80

File tree

3 files changed

+60
-0
lines changed

3 files changed

+60
-0
lines changed

β€Ž.github/workflows/codeql.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '00 00 * * 1'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
# Runner size impacts CodeQL analysis time. To learn more, please see:
15+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
16+
# - https://gh.io/supported-runners-and-hardware-resources
17+
# - https://gh.io/using-larger-runners
18+
# Consider using larger runners for possible analysis time improvements.
19+
runs-on: 'ubuntu-latest'
20+
timeout-minutes: 360
21+
permissions:
22+
actions: read
23+
contents: read
24+
security-events: write
25+
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
language: [ 'python' ]
30+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ]
31+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v3
36+
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@v2
39+
with:
40+
languages: ${{ matrix.language }}
41+
# If you wish to specify custom queries, you can do so here or in a config file.
42+
# By default, queries listed here will override any specified in a config file.
43+
# Prefix the list here with "+" to use these queries and those in the config file.
44+
45+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
46+
# queries: security-extended,security-and-quality
47+
48+
- name: Perform CodeQL Analysis
49+
uses: github/codeql-action/analyze@v2
50+
with:
51+
category: "/language:${{matrix.language}}"

β€Ž.github/workflows/test.yml

+8
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,16 @@ name: Unit tests
66
on:
77
push:
88
branches: [ main ]
9+
paths:
10+
- "tests/**"
11+
- "plotly_resampler/**"
12+
- "poetry.lock"
913
pull_request:
1014
branches: [ main ]
15+
paths:
16+
- "tests/**"
17+
- "plotly_resampler/**"
18+
- "poetry.lock"
1119

1220
jobs:
1321
test:

β€ŽREADME.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[![PyPI Latest Release](https://img.shields.io/pypi/v/plotly-resampler.svg)](https://pypi.org/project/plotly-resampler/)
88
[![support-version](https://img.shields.io/pypi/pyversions/plotly-resampler)](https://img.shields.io/pypi/pyversions/plotly-resampler)
99
[![codecov](https://img.shields.io/codecov/c/github/predict-idlab/plotly-resampler?logo=codecov)](https://codecov.io/gh/predict-idlab/plotly-resampler)
10+
[![CodeQL](https://github.com/predict-idlab/plotly-resampler/actions/workflows/codeql.yml/badge.svg)](https://github.com/predict-idlab/plotly-resampler/actions/workflows/codeql.yml)
1011
[![Downloads](https://pepy.tech/badge/plotly-resampler)](https://pepy.tech/project/plotly-resampler)
1112
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?)](http://makeapullrequest.com)
1213
[![Testing](https://github.com/predict-idlab/plotly-resampler/actions/workflows/test.yml/badge.svg)](https://github.com/predict-idlab/plotly-resampler/actions/workflows/test.yml)

0 commit comments

Comments
Β (0)