Skip to content

Commit 46290c0

Browse files
committed
ci: add tests to ci
1 parent 758318b commit 46290c0

File tree

3 files changed

+62
-96
lines changed

3 files changed

+62
-96
lines changed

.github/workflows/codeql.yml

Lines changed: 19 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,13 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
121
name: "CodeQL"
132

143
on:
154
push:
165
branches: [ "master" ]
176
pull_request:
18-
# The branches below must be a subset of the branches above
197
branches: [ "master" ]
20-
8+
schedule:
9+
# 17:00 on Friday (UTC)
10+
- cron: "00 17 * * 5"
2111

2212
jobs:
2313
analyze:
@@ -32,42 +22,21 @@ jobs:
3222
fail-fast: false
3323
matrix:
3424
language: [ 'python' ]
35-
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
36-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
3725

3826
steps:
39-
- name: Checkout repository
40-
uses: actions/checkout@v3
41-
42-
# Initializes the CodeQL tools for scanning.
43-
- name: Initialize CodeQL
44-
uses: github/codeql-action/init@v2
45-
with:
46-
languages: ${{ matrix.language }}
47-
# If you wish to specify custom queries, you can do so here or in a config file.
48-
# By default, queries listed here will override any specified in a config file.
49-
# Prefix the list here with "+" to use these queries and those in the config file.
50-
51-
# 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
52-
# queries: security-extended,security-and-quality
53-
54-
55-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
56-
# If this step fails, then you should remove it and run the build manually (see below)
57-
- name: Autobuild
58-
uses: github/codeql-action/autobuild@v2
59-
60-
# ℹ️ Command-line programs to run using the OS shell.
61-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
62-
63-
# If the Autobuild fails above, remove it and uncomment the following three lines.
64-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
65-
66-
# - run: |
67-
# echo "Run, Build Application using script"
68-
# ./location_of_script_within_repo/buildscript.sh
69-
70-
- name: Perform CodeQL Analysis
71-
uses: github/codeql-action/analyze@v2
72-
with:
73-
category: "/language:${{matrix.language}}"
27+
- name: Checkout repository
28+
uses: actions/checkout@v4
29+
30+
- name: Initialize CodeQL
31+
uses: github/codeql-action/init@v3
32+
with:
33+
languages: ${{ matrix.language }}
34+
queries: +security-and-quality
35+
36+
- name: Autobuild
37+
uses: github/codeql-action/autobuild@v3
38+
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v3
41+
with:
42+
category: "/language:${{ matrix.language }}"

.github/workflows/main.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "master", "ci-*" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
schedule:
9+
# 17:00 on Friday (UTC)
10+
- cron: "00 17 * * 5"
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
19+
fail-fast: false
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Set up python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --editable '.[develop,docs]'
31+
shell: bash
32+
33+
- name: Check linting and type annotations
34+
run: |
35+
python -m flake8 src tests
36+
python -m mypy src tests
37+
shell: bash
38+
39+
- name: Run tests
40+
if: success() || failure()
41+
run: |
42+
python -m pytest -v -s src tests
43+
shell: bash

.github/workflows/pyre.yml

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

0 commit comments

Comments
 (0)