Remove travis-ci and add github actions workflows (#16)
This commit is contained in:
parent
49ccaeb5cb
commit
938416ac61
|
@ -8,11 +8,8 @@ name: "CodeQL"
|
|||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '0 14 * * 6'
|
||||
- cron: "0 14 * * 6"
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
|
@ -24,48 +21,48 @@ jobs:
|
|||
matrix:
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
language: ['python']
|
||||
language: ["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
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# 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
|
||||
# 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
|
||||
# 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
|
||||
# ℹ️ 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
|
||||
# ✏️ 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
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
name: Format check
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
format-check:
|
||||
name: Check Codebase format
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.9
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements_test.txt
|
||||
|
||||
- name: Run Black
|
||||
run: |
|
||||
black --version
|
||||
black . --check
|
|
@ -0,0 +1,27 @@
|
|||
name: Run Test Suite
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
run-test-suite:
|
||||
name: Run Test Suite
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python_version: [3.6, 3.7, 3.8]
|
||||
django_version: [2.2, 3.1]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python ${{ matrix.python_version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python_version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: pip install -r requirements_test.txt
|
||||
|
||||
- name: Run Tests
|
||||
run: tox -e py${{ matrix.python_version }}-django${{ matrix.django_version }}
|
36
.travis.yml
36
.travis.yml
|
@ -1,36 +0,0 @@
|
|||
# Config file for automatic testing at travis-ci.org
|
||||
|
||||
stages:
|
||||
- format
|
||||
- test
|
||||
|
||||
language: python
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: format
|
||||
name: "Black format check"
|
||||
python: "3.7"
|
||||
install: pip install black
|
||||
script:
|
||||
- black --version
|
||||
- black . --check
|
||||
after_success: ""
|
||||
|
||||
python:
|
||||
- "3.6"
|
||||
- "3.7"
|
||||
- "3.8"
|
||||
|
||||
env:
|
||||
- DJANGO_VERSION=django-22
|
||||
- DJANGO_VERSION=django-30
|
||||
|
||||
# command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
|
||||
install: pip install -r requirements_test.txt
|
||||
|
||||
# command to run tests using coverage, e.g. python setup.py test
|
||||
script: tox -e $(echo py$TRAVIS_PYTHON_VERSION-$DJANGO_VERSION | tr -d .)
|
||||
|
||||
after_success:
|
||||
- coveralls
|
|
@ -9,6 +9,7 @@ Development
|
|||
* Challenges are now stored on the database. No longer expire when a new one is
|
||||
generated.
|
||||
* Added initial support for DRF, TokenAuthentication only.
|
||||
* Move CI from Travis-ci to Github Actions
|
||||
|
||||
|
||||
0.1.0 (2020-03-31)
|
||||
|
|
|
@ -2,15 +2,6 @@
|
|||
Django-Cryptolock
|
||||
=============================
|
||||
|
||||
.. image:: https://badge.fury.io/py/django-cryptolock.svg
|
||||
:target: https://badge.fury.io/py/django-cryptolock
|
||||
|
||||
.. image:: https://travis-ci.org/dethos/django-cryptolock.svg?branch=master
|
||||
:target: https://travis-ci.org/dethos/django-cryptolock
|
||||
|
||||
.. image:: https://coveralls.io/repos/github/dethos/django-cryptolock/badge.svg
|
||||
:target: https://coveralls.io/github/dethos/django-cryptolock
|
||||
|
||||
Authentication using cryptocurrency wallets for Django projects.
|
||||
|
||||
This package provides a django app containing a set of utilities to
|
||||
|
|
|
@ -14,3 +14,4 @@ pytest
|
|||
pytest-django
|
||||
pytest-cov
|
||||
model_mommy
|
||||
black
|
||||
|
|
15
tox.ini
15
tox.ini
|
@ -1,16 +1,17 @@
|
|||
[tox]
|
||||
envlist =
|
||||
{py36,py37,py38}-django-{22,30}
|
||||
{py3.6,py3.7,py3.8}-django{2.2,3.1}
|
||||
|
||||
[testenv]
|
||||
setenv =
|
||||
PYTHONPATH = {toxinidir}:{toxinidir}/django_cryptolock
|
||||
commands = pytest --cov=django_cryptolock tests/
|
||||
commands =
|
||||
pytest --cov=django_cryptolock tests/
|
||||
deps =
|
||||
django-22: django>=2.2,<3.0
|
||||
django-30: django>=3.0,<3.1
|
||||
django2.2: django>=2.2,<3.0
|
||||
django3.1: django>=3.1,<3.2
|
||||
-r {toxinidir}/requirements_test.txt
|
||||
basepython =
|
||||
py38: python3.8
|
||||
py37: python3.7
|
||||
py36: python3.6
|
||||
py3.8: python3.8
|
||||
py3.7: python3.7
|
||||
py3.6: python3.6
|
||||
|
|
Loading…
Reference in New Issue