Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github actions migration #187

Closed
wants to merge 13 commits into from
Closed
Show file tree
Hide file tree
Changes from 10 commits
Commits
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
199 changes: 0 additions & 199 deletions .circleci/config.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
62 changes: 62 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: build-and-release

on:
push:
tags:
- "**"

jobs:
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.6"
architecture: x64
- name: Restoring cache
uses: actions/cache@v2
with:
path: ./venv
key: ${{ runner.os }}-python-${{ hashFiles('requirements.txt') }}
- name: Create virtual environment
run: . scripts/create_venv.sh
- name: Build package
run: . scripts/build.sh
- name: Store build artifacts
uses: actions/upload-artifact@v2
with:
name: stored-package
path: dist
release:
name: Release package
runs-on: ubuntu-latest
needs:
- "build"
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.6"
architecture: x64
- name: Restoring cache
uses: actions/cache@v2
with:
path: ./venv
key: ${{ runner.os }}-python-${{ hashFiles('requirements.txt') }}
- name: Create virtual environment
run: . scripts/create_venv.sh
- name: Init .pypirc
env:
PYPI_USER: ${{ secrets.PYPI_USER }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do we set these secrets?

PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: . scripts/init_pypirc.sh
- name: Download a single artifact
uses: actions/download-artifact@v2
with:
name: stored-package
- name: Release package
run: . scripts/release.sh dist
120 changes: 120 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: Code Quality Checks

on:
push:
branches-ignore:
- "master"
jobs:
lint:
name: Linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.6"
architecture: x64
- name: Restoring cache
uses: actions/cache@v2
with:
path: ./venv
key: ${{ runner.os }}-python-${{ hashFiles('requirements.txt') }}
- name: Create virtual environment
run: . scripts/create_venv.sh
- name: Check code style
run: . scripts/lint.sh
test:
name: Run tests
needs:
- "lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.6"
architecture: x64
- name: Restoring cache
uses: actions/cache@v2
with:
path: ./venv
key: ${{ runner.os }}-python-${{ hashFiles('requirements.txt') }}
- name: Create virtual environment
run: . scripts/create_venv.sh
- name: Install package
run: . scripts/helpers.sh && install_package [devel]
- name: Run tests
run: . scripts/run_tests.sh
type-check:
name: Mypy check
needs:
- "lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.6"
architecture: x64
- name: Restoring cache
uses: actions/cache@v2
with:
path: ./venv
key: ${{ runner.os }}-python-${{ hashFiles('requirements.txt') }}
- name: Create virtual environment
run: . scripts/create_venv.sh
- name: Install package
run: . scripts/helpers.sh && install_package [devel]
- name: Run type checking
run: . scripts/run_type_check.sh
pip-check:
name: Pip check
needs:
- "lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.6"
architecture: x64
- name: Restoring cache
uses: actions/cache@v2
with:
path: ./venv
key: ${{ runner.os }}-python-${{ hashFiles('requirements.txt') }}
- name: Create virtual environment
run: . scripts/create_venv.sh
- name: Install package
run: . scripts/helpers.sh && install_package [devel]
- name: Run pip check
run: . scripts/helpers.sh && activate_venv && pip check
build-docs:
name: Build documentation
needs:
- "lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.6"
architecture: x64
- name: Restoring cache
uses: actions/cache@v2
with:
path: ./venv
key: ${{ runner.os }}-python-${{ hashFiles('requirements.txt') }}
- name: Create virtual environment
run: . scripts/create_venv.sh
- name: Install pandoc
run: sudo apt-get install -y -qq pandoc
- name: Install package
run: . scripts/helpers.sh && install_package [devel]
- name: Build documentation
run: . scripts/build_docs.sh
Loading