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:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
pull_request:
|
|
||||||
# The branches below must be a subset of the branches above
|
|
||||||
branches: [master]
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 14 * * 6'
|
- cron: "0 14 * * 6"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
analyze:
|
analyze:
|
||||||
|
@ -24,48 +21,48 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
# Override automatic language detection by changing the below list
|
# Override automatic language detection by changing the below list
|
||||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||||
language: ['python']
|
language: ["python"]
|
||||||
# Learn more...
|
# Learn more...
|
||||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
# We must fetch at least the immediate parents so that if this is
|
# We must fetch at least the immediate parents so that if this is
|
||||||
# a pull request then we can checkout the head.
|
# a pull request then we can checkout the head.
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
# If this run was triggered by a pull request event, then checkout
|
# If this run was triggered by a pull request event, then checkout
|
||||||
# the head of the pull request instead of the merge commit.
|
# the head of the pull request instead of the merge commit.
|
||||||
- run: git checkout HEAD^2
|
- run: git checkout HEAD^2
|
||||||
if: ${{ github.event_name == 'pull_request' }}
|
if: ${{ github.event_name == 'pull_request' }}
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v1
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# 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.
|
# 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.
|
# 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
|
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# 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)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v1
|
uses: github/codeql-action/autobuild@v1
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
|
|
||||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
# ✏️ 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
|
# and modify them (or add more) to build your code if your project
|
||||||
# uses a compiled language
|
# uses a compiled language
|
||||||
|
|
||||||
#- run: |
|
#- run: |
|
||||||
# make bootstrap
|
# make bootstrap
|
||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
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
|
* Challenges are now stored on the database. No longer expire when a new one is
|
||||||
generated.
|
generated.
|
||||||
* Added initial support for DRF, TokenAuthentication only.
|
* Added initial support for DRF, TokenAuthentication only.
|
||||||
|
* Move CI from Travis-ci to Github Actions
|
||||||
|
|
||||||
|
|
||||||
0.1.0 (2020-03-31)
|
0.1.0 (2020-03-31)
|
||||||
|
|
|
@ -2,15 +2,6 @@
|
||||||
Django-Cryptolock
|
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.
|
Authentication using cryptocurrency wallets for Django projects.
|
||||||
|
|
||||||
This package provides a django app containing a set of utilities to
|
This package provides a django app containing a set of utilities to
|
||||||
|
|
|
@ -14,3 +14,4 @@ pytest
|
||||||
pytest-django
|
pytest-django
|
||||||
pytest-cov
|
pytest-cov
|
||||||
model_mommy
|
model_mommy
|
||||||
|
black
|
||||||
|
|
15
tox.ini
15
tox.ini
|
@ -1,16 +1,17 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
{py36,py37,py38}-django-{22,30}
|
{py3.6,py3.7,py3.8}-django{2.2,3.1}
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
setenv =
|
setenv =
|
||||||
PYTHONPATH = {toxinidir}:{toxinidir}/django_cryptolock
|
PYTHONPATH = {toxinidir}:{toxinidir}/django_cryptolock
|
||||||
commands = pytest --cov=django_cryptolock tests/
|
commands =
|
||||||
|
pytest --cov=django_cryptolock tests/
|
||||||
deps =
|
deps =
|
||||||
django-22: django>=2.2,<3.0
|
django2.2: django>=2.2,<3.0
|
||||||
django-30: django>=3.0,<3.1
|
django3.1: django>=3.1,<3.2
|
||||||
-r {toxinidir}/requirements_test.txt
|
-r {toxinidir}/requirements_test.txt
|
||||||
basepython =
|
basepython =
|
||||||
py38: python3.8
|
py3.8: python3.8
|
||||||
py37: python3.7
|
py3.7: python3.7
|
||||||
py36: python3.6
|
py3.6: python3.6
|
||||||
|
|
Loading…
Reference in New Issue