⭐ Star
this repository if you find it valuable and worth maintaining.
👁 Watch
this repository to get notified about new releases, issues, etc.
This is a GitHub repository template for a Go application. You can use it:
- to create a new repoisitory with automation and environment setup,
- as reference when improving automation for an existing repository.
It includes:
- continuous integration via GitHub Actions
- CI Workflows:
- Test
- Format check
- Clippy
- Docs
- Publish
- Code coverage report on PR
- CD Workflows (Release artifacts on Cargo and Github):
- os: macos-latest target: x86_64-apple-darwin
- os: ubuntu-latest target: x86_64-unknown-linux-gnu
- os: windows-latest target: x86_64-pc-windows-msvc
- os: ubuntu-latest target: aarch64-unknown-linux-gnu
- os: ubuntu-latest target: i686-unknown-linux-gnu
- Security:
- Audit everyday at 00.00 UTC
- dependabot to update dependencies weekly
- CI Workflows:
- build automation via Cargo,
- dependency management using Cargo Modules,
- code formatting using rust fmt,
- linting with clippy,
- code coverage HTML report and tests
- releasing using Github Release,
- dependencies scanning and updating thanks to Dependabot,
- security code analysis using Audit-check,
- Sign up on Codecov and configure Codecov GitHub Application for all repositories.
- Click the
Use this template
button (alt. clone or download this repository). - Replace all occurrences of
runtime-machines/rust-template
toyour_org/repo_name
in all files. - Replace all occurrences of
rust-template
torepo_name
in all files. - Set up
CODECOV_TOKEN
secret inhttps://github.com/runtime-machines/REPO_NAME/settings/secrets/actions
. - Update the following files:
- CHANGELOG.md
- CODE_OF_CONDUCT.md
- LICENSE (when defined)
- README.md
- Uncomment the necessary workflow paths in the ci.yml workflow and add the ${{ secrets.CODECOV_TOKEN }} secret if you're planning to keep the repository private. Also you might need to add a /script/run.sh and a migration folder, depending on your SQLX needs
- To add a deploy key in order to use a private dependency:
- uncomment the
ssh-agent
step - generate the key on your local machine using
ssh-keygen -t ed25519 -C "<key_description:[email protected]>"
- Add the .pub to the source repository deploy keys
- Add the private key in this repository secrets
- Add the secret to the
ssh-private-key
in thessh-agent
step
- uncomment the
- Uncomment SQLX-CLI and the SQLX-CLI cache step if necessary (installation path of SQLX-CLI will be ~/.cargo/)
This project license
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the license, shall be licensed as above, without any additional terms or conditions.
See CONTRIBUTING.md.