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

feat: basic ci setup #1

Merged
merged 3 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[*]
charset = utf-8
insert_final_newline = true
end_of_line = lf
indent_style = space
indent_size = 2
tab_width = 2
max_line_length = 140
trim_trailing_whitespace = true
single_quote = true
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "\U0001F41C Bug report"
about: Report a reproducible bug.
title: ''
labels: bug
assignees: ''
---

### Subject of the issue

<!-- Describe your issue here. -->

### Your environment

<!--
* Please provide the output of `algokit doctor` command response,
* This will give us a good idea about your environment
-->

### Steps to reproduce

1.
2.

### Expected behaviour

### Actual behaviour
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: "\U0001F514 Feature Request"
about: Suggestions for how we can improve the algorand platform.
title: ''
labels: enhancement
assignees: ''
---

## Problem

<!-- What is the problem that we’re trying to solve? -->

## Solution

<!-- Do you have a potential/suggested solution? Document more than one if possible. -->

### Proposal

<!-- Describe the solution you’d like in detail. -->

### Pros and Cons

<!-- What are the advantages and disadvantages of this solution? -->

## Dependencies

<!-- Does the solution have any team or design dependencies? -->
5 changes: 5 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Proposed Changes

-
-
-
37 changes: 37 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Continuous Delivery of Template

on:
push:
branches:
- main

concurrency: release

jobs:
ci-check-copier:
name: Check Copier
uses: ./.github/workflows/check-copier.yaml

tag-release:
runs-on: "ubuntu-latest"
needs: ci-check-copier
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Tag release
id: tag
uses: TriPSs/conventional-changelog-action@v3.18.0
with:
skip-commit: "true"
tag-prefix: ""
skip-on-empty: "false"

- name: Create Release
uses: softprops/action-gh-release@v1
if: ${{ steps.tag.outputs.skipped == 'false' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.tag }}
body: ${{ steps.tag.outputs.clean_changelog }}
34 changes: 34 additions & 0 deletions .github/workflows/check-copier.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Check Template

on:
workflow_call:

jobs:
check-python:
runs-on: "ubuntu-latest"
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install poetry
run: pipx install poetry

- name: Install algokit
run: pipx install git+https://github.com/algorandfoundation/algokit-cli@feat/init_wizard_v2 --force

- name: Configure git
shell: bash
run: |
# set git user and email as test invoke git
git config --global user.email "actions@github.com" && git config --global user.name "github-actions"

- name: Copy template (must complete without failing)
shell: bash
run: |
set -o pipefail
algokit init --template-url=. --template-url-ref="HEAD" -n test_run --UNSAFE-SECURITY-accept-template-url --no-bootstrap --no-git
8 changes: 8 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: Pull Request validation

on: [pull_request]

jobs:
pr-check:
name: Check Template
uses: ./.github/workflows/check-copier.yaml