Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
dc8d4d2
Codespell and flake8 warnings - including new todos for complex code
CoMPaTech Oct 28, 2020
8791895
Add Github Actions
CoMPaTech Oct 28, 2020
3e68e43
Remove blunt publishing to testpypi
CoMPaTech Oct 28, 2020
ed1b6cf
Scaffold and testpy
CoMPaTech Oct 29, 2020
a75eca8
Scaffold and testpy
CoMPaTech Oct 29, 2020
ebf1c2b
Scaffold and testpy - indent typo
CoMPaTech Oct 29, 2020
91f2896
Scaffold and testpy - disable travis
CoMPaTech Oct 29, 2020
a1dccb7
Scaffold and testpy - add testpypi
CoMPaTech Oct 29, 2020
f7f8d4d
Scaffold and testpy - add testpypi and let it soft fail
CoMPaTech Oct 29, 2020
d8a2f79
Scaffold and testpy - force order
CoMPaTech Oct 29, 2020
55df418
Scaffold and testpy - remove faulty merge publish
CoMPaTech Oct 29, 2020
fa070d6
Scaffold and testpy - remove faulty merge publish - swap for correctness
CoMPaTech Oct 29, 2020
d9ee778
Allow merge to pypi (still softfailing if already exists
CoMPaTech Oct 29, 2020
bd04953
Allow merge to pypi (still softfailing if already exists) - typo
CoMPaTech Oct 29, 2020
76ab993
Version bump
CoMPaTech Oct 29, 2020
1030446
Update badge
CoMPaTech Oct 29, 2020
876d66a
Update badge
CoMPaTech Oct 29, 2020
07643be
Correct badges
CoMPaTech Oct 29, 2020
8387542
Rerun commit
CoMPaTech Oct 30, 2020
ef2fe88
Automatically detect common vulnerabilities and coding errors
CoMPaTech Oct 30, 2020
8abdc53
Add security notice as advised
CoMPaTech Oct 30, 2020
e64a2f5
Reset codacy part
CoMPaTech Oct 30, 2020
ba69706
Change code ql to weekly only
CoMPaTech Oct 31, 2020
d14082d
Improve merge action
CoMPaTech Oct 31, 2020
2b5f3bc
Remove codacy
CoMPaTech Oct 31, 2020
bdf21b4
Attempt to improve pre-commit environment restore (and fix duplicate …
CoMPaTech Oct 31, 2020
852e103
Include codefactor
CoMPaTech Oct 31, 2020
689b132
Correct badge label
CoMPaTech Oct 31, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 69 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
# ******** NOTE ********

name: "CodeQL"

on:
# push:
# branches: [ main ]
# pull_request:
# # The branches below must be a subset of the branches above
# branches: [ main ]
schedule:
- cron: '24 14 * * 5'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
language: [ 'python' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection

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 }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

104 changes: 104 additions & 0 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Latest release

env:
CACHE_VERSION: 1
DEFAULT_PYTHON: 3.9
PRE_COMMIT_HOME: ~/.cache/pre-commit

# Only run on merges
on:
pull_request:
types: closed
branches:
- main

jobs:
# Prepare default python version environment
prepare:
runs-on: ubuntu-latest
name: Prepare
steps:
- name: Check out committed code
uses: actions/checkout@v2
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python ${{ env.DEFAULT_PYTHON }} virtual environment
id: cache-venv
uses: actions/cache@v2
with:
path: venv
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements_test.txt') }}-${{
hashFiles('setup.py') }}
restore-keys: |
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements_test.txt') }}-${{ hashFiles('setup.py') }}-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements_test.txt') }}
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{ steps.python.outputs.python-version }}-
- name: Create Python virtual environment
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
python -m venv venv
. venv/bin/activate
pip install -U pip setuptools
pip install -e .
pip install -r requirements_test.txt
- name: Restore pre-commit environment from cache
id: cache-precommit
uses: actions/cache@v2
with:
path: ${{ env.PRE_COMMIT_HOME }}
key: |
${{ env.CACHE_VERSION}}-${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ env.CACHE_VERSION}}-${{ runner.os }}-pre-commit-
- name: Install pre-commit dependencies
if: steps.cache-precommit.outputs.cache-hit != 'true'
run: |
. venv/bin/activate
pre-commit install-hooks

publishing:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
needs: prepare
# Only trigger on merges, not just closes
if: github.event.pull_request.merged == true
steps:
- name: Check out committed code
uses: actions/checkout@main
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
id: python
uses: actions/setup-python@v2
with:
python-version: ${{ env.DEFAULT_PYTHON }}
- name: Restore base Python ${{ env.DEFAULT_PYTHON }} virtual environment
id: cache-venv
uses: actions/cache@v2
with:
path: venv
key: >-
${{ env.CACHE_VERSION}}-${{ runner.os }}-base-venv-${{
steps.python.outputs.python-version }}-${{
hashFiles('requirements_test.txt') }}-${{
hashFiles('setup.py') }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python virtual environment from cache"
exit 1
- name: Build a distribution
run: >-
python setup.py sdist
- name: Publish distribution 📦 to Test PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.pypi_token }}
skip_existing: true
28 changes: 0 additions & 28 deletions .github/workflows/publish-to-test-pypi.yml

This file was deleted.

Loading