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

Add badges and better Readme #8

Merged
merged 1 commit into from
May 9, 2023
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
2 changes: 1 addition & 1 deletion .github/workflows/trunk.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: trunk check

on:
push:
Expand Down
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
# workflow-tutorial
# Workflow-Tutorial

Tutorial repo, that helps to setup github workflows.
[![Test C++](https://github.com/InnocentBug/workflow-tutorial/actions/workflows/test_cpp.yml/badge.svg)](https://github.com/InnocentBug/workflow-tutorial/actions/workflows/test_cpp.yml)
[![Test Python](https://github.com/InnocentBug/workflow-tutorial/actions/workflows/test_python.yml/badge.svg)](https://github.com/InnocentBug/workflow-tutorial/actions/workflows/test_python.yml)
[![Trunk](https://github.com/InnocentBug/workflow-tutorial/actions/workflows/trunk.yml/badge.svg)](https://github.com/InnocentBug/workflow-tutorial/actions/workflows/trunk.yml)

This is a tutorial repository that demonstrates how to set up a GitHub workflow for two independent projects, one in Python and the other in C++.

## C++ Project

The C++ project is located in the [`src`](src/) directory. The project uses CMake for building, and tests are included via CMake as well.

You can check the workflow file for this project at [`.github/workflows/test_cpp.yml`](.github/workflows/test_cpp.yml).

## Python Project

The Python project is located in [`magic_python`](magic_python/) and is fully set up as a module. Tests are run using `pytest`.

You can check the workflow file for this project at [`.github/workflows/test_python.yml`](.github/workflows/test_python.yml).

## Trunk

We use [trunk.io](https://trunk.io) to manage formatting and software engineering. It is free for open-source projects; please refer to their website for more details.

You can check the workflow file for this project at [`.github/workflows/trunk.yml`](.github/workflows/trunk.yml). This workflow ensures that everything is up to standard.

## Notes

Extra notes for the process are included below. These can be ignored.

1. Create a repository, set it to public, apply MIT license, add a Python gitignore, and clone it.
2. Protect the `main` branch via `Settings > Branches > Add Protection Rule`. The settings should include requiring a PR, requiring approvals (optional), dismissing stale pull request reviews, requiring status checks, and requiring the branch to be up-to-date.
3. Add labels to PR, assign yourself to PR, squash and merge PR.
4. Add the C++ program, but not the test. Push and open a PR.
5. Add a simple workflow to test.
6. Add CMake to build and test.
7. Create badges via `Actions > workflow name > [...] > create status badge > add text`.
12 changes: 0 additions & 12 deletions notes.txt

This file was deleted.