Skip to content

Commit

Permalink
Move to github actions (#16)
Browse files Browse the repository at this point in the history
* move CI to github actions
* update dependencies
* update linters
  • Loading branch information
zaro0508 authored Jan 24, 2024
1 parent 9a30b98 commit d5681bb
Show file tree
Hide file tree
Showing 9 changed files with 631 additions and 608 deletions.
107 changes: 0 additions & 107 deletions .circleci/config.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
### Subject of the issue
Describe your issue here.

### Your environment
* version of sceptre (sceptre --version)
* version of python (python --version)
* which OS/distro

### Steps to reproduce
Tell us how to reproduce this issue. Please provide sceptre projct files if possible,
you can use https://plnkr.co/edit/ANFHm61Ilt4mQVgF as a base.

### Expected behaviour
Tell us what should happen

### Actual behaviour
Tell us what happens instead
21 changes: 21 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[Your PR description here]

## PR Checklist

- [ ] Wrote a good commit message & description [see guide below].
- [ ] Commit message starts with `[Resolve #issue-number]`.
- [ ] Added/Updated unit tests.
- [ ] Added/Updated integration tests (if applicable).
- [ ] All unit tests (`poetry run tox`) are passing.
- [ ] Used the same coding conventions as the rest of the project.
- [ ] The new code passes pre-commit validations (`poetry run pre-commit run --all-files`).
- [ ] The PR relates to _only_ one subject with a clear title.
and description in grammatically correct, complete sentences.

## Approver/Reviewer Checklist

- [ ] Before merge squash related commits.

## Other Information

[Guide to writing a good commit](http://chris.beams.io/posts/git-commit/)
16 changes: 16 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: main

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+([0-9]+)'

jobs:
pypi-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Publish to pypi
run: poetry publish --build -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}
58 changes: 58 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: tests

on:
push:
branches:
- '*'
pull_request:
branches:
- '*'

jobs:
packaging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-interaction --all-extras
- name: build package
run: poetry build
# use https://github.com/medmunds/tox-gh-matrix to export tox envlist to GH actions
get-tox-envlist:
runs-on: ubuntu-latest
outputs:
envlist: ${{ steps.generate-envlist.outputs.envlist }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-interaction --all-extras
- id: generate-envlist
run: poetry run tox --gh-matrix
unit-tests:
needs: get-tox-envlist
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
tox: ${{ fromJSON(needs.get-tox-envlist.outputs.envlist) }}
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.tox.python.spec }}
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: poetry install --no-interaction --all-extras
- name: run python tests
run: poetry run tox -e ${{ matrix.tox.name }}
- name: run python test report
run: poetry run tox -e report
31 changes: 16 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ default_language_version:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
- repo: https://github.com/adrienverge/yamllint
rev: v1.30.0
rev: v1.33.0
hooks:
- id: yamllint
- repo: https://github.com/awslabs/cfn-python-lint
rev: v0.76.2
rev: v0.84.0
hooks:
- id: cfn-python-lint
args:
Expand All @@ -27,26 +27,27 @@ repos:
- "-i=W6001"
exclude: |
(?x)(
^integration-tests/sceptre-project/config/|
^integration-tests/sceptre-project/templates/jinja/|
^tests/fixtures-vpc/config/|
^tests/fixtures/config/|
^temp/|
^.circleci/|
^.github/|
^.pre-commit-config.yaml
)
- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.12.1
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.10
- repo: https://github.com/python-poetry/poetry
rev: '1.4.0'
rev: '1.7.0'
hooks:
- id: poetry-check
- id: poetry-lock
language_version: python3.10
- repo: https://github.com/AleksaC/circleci-cli-py
rev: v0.1.25638
args: ['--check']
- repo: https://github.com/sirosen/check-jsonschema
rev: 0.27.3
hooks:
- id: circle-ci-validator
- id: check-github-workflows
- id: check-github-actions
Loading

0 comments on commit d5681bb

Please sign in to comment.