feat: Continuous integration via Forgejo Actions/runners (#75)
All checks were successful
/ test (push) Successful in 2m20s
All checks were successful
/ test (push) Successful in 2m20s
Adds a continuous integration workflow to the repository, using the [Forgejo Actions](https://forgejo.org/docs/next/user/actions/) framework. Concurrently, Aaron added a [wiki page](https://code.studioinfinity.org/glen/dyna3/wiki/Continuous-integration) to document the continuous integration system. In particular, this page explains how to [run continuous integration checks on a development machine](wiki/Continuous-integration#execution), either directly or in a container. Co-authored-by: Aaron Fenyes <aaron.fenyes@fareycircles.ooo> Co-authored-by: Glen Whitney <glen@studioinfinity.org> Reviewed-on: #75 Co-authored-by: Vectornaut <vectornaut@nobody@nowhere.net> Co-committed-by: Vectornaut <vectornaut@nobody@nowhere.net>
This commit is contained in:
parent
2c4fd39c1f
commit
b86f176151
7 changed files with 877 additions and 7 deletions
22
.forgejo/setup-trunk/action.yaml
Normal file
22
.forgejo/setup-trunk/action.yaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
# set up the Trunk web build system
|
||||
#
|
||||
# https://trunkrs.dev
|
||||
#
|
||||
# the `curl` call is based on David Tolnay's `rust-toolchain` action
|
||||
#
|
||||
# https://github.com/dtolnay/rust-toolchain
|
||||
#
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- run: rustup target add wasm32-unknown-unknown
|
||||
|
||||
# install the Trunk binary to `ci-bin` within the workspace directory, which
|
||||
# is determined by the `github.workspace` label and reflected in the
|
||||
# `GITHUB_WORKSPACE` environment variable. then, make the `trunk` command
|
||||
# available by placing the fully qualified path to `ci-bin` on the
|
||||
# workflow's search path
|
||||
- run: mkdir -p ci-bin
|
||||
- run: curl --output - --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail 'https://github.com/trunk-rs/trunk/releases/download/v0.21.12/trunk-x86_64-unknown-linux-gnu.tar.gz' | tar --gunzip --extract --file -
|
||||
working-directory: ci-bin
|
||||
- run: echo "${{ github.workspace }}/ci-bin" >> $GITHUB_PATH
|
29
.forgejo/workflows/continuous-integration.yaml
Normal file
29
.forgejo/workflows/continuous-integration.yaml
Normal file
|
@ -0,0 +1,29 @@
|
|||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [main]
|
||||
jobs:
|
||||
# run the automated tests, reporting success if the tests pass and were built
|
||||
# without warnings. the examples are run as tests, because we've configured
|
||||
# each example target with `test = true` and `harness = false` in Cargo.toml.
|
||||
# Trunk build failures caused by problems outside the Rust source code, like
|
||||
# missing assets, should be caught by `trunk_build_test`
|
||||
test:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: cimg/rust:1.85-node
|
||||
defaults:
|
||||
run:
|
||||
# set the default working directory for each `run` step, relative to the
|
||||
# workspace directory. this default only affects `run` steps (and if we
|
||||
# tried to set the `working-directory` label for any other kind of step,
|
||||
# it wouldn't be recognized anyway)
|
||||
working-directory: app-proto
|
||||
steps:
|
||||
# Check out the repository so that its top-level directory is the
|
||||
# workspace directory (action variable `github.workspace`, environment
|
||||
# variable `$GITHUB_WORKSPACE`):
|
||||
- uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
- uses: ./.forgejo/setup-trunk
|
||||
- run: RUSTFLAGS='-D warnings' cargo test
|
Loading…
Add table
Add a link
Reference in a new issue