The simple-ci
action allows you to easily build and test your Rust projects.
See action.yml
for configuration options.
This builds, tests, and checks the formatting of your project.
- uses: rust-lang/simpleinfra/github-actions/simple-ci@master
with:
check_fmt: true
This template builds and tests your project on stable, beta, and nightly across linux, macos, windows.
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- run: rustup default ${{ matrix.channel }}
- uses: rust-lang/simpleinfra/github-actions/simple-ci@master
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
channel: [stable, beta, nightly]
The action is written in NodeJS 16, and you can install the dependencies with:
npm install
npm start
GitHub Actions requires all the dependencies to be committed, so before creating a commit you need to run:
npm run build
The command will bundle everything in dist/index.js
. That file will need to
be committed.