Added build action
All checks were successful
Rust-build / build (push) Successful in 1m18s

This commit is contained in:
Justine Pelletreau 2023-07-17 12:05:56 +02:00
parent 8f08f1784c
commit 5476327560
2 changed files with 50 additions and 19 deletions

View File

@ -0,0 +1,50 @@
name: Rust-build
on:
push:
branches:
- "main"
jobs:
build:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Check-out
uses: actions/checkout@v3
- name: Install stable toolchain
uses: https://github.com/actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo check
uses: https://github.com/actions-rs/cargo@v1
with:
command: check
- name: Install nightly toolchain with clippy available
uses: https://github.com/actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: clippy
- name: Run cargo clippy
uses: https://github.com/actions-rs/cargo@v1
continue-on-error: true # WARNING: only for this example, remove it!
with:
command: clippy
args: -- -D warnings
- name: Test
run: cargo test
- name: Build
run: cargo build --release

View File

@ -1,19 +0,0 @@
name: GitHub Actions Demo
run-name: ${{ gitea.actor }} is testing out GitHub Actions
on: [push]
jobs:
Explore-GitHub-Actions:
runs-on: ubuntu-latest
steps:
- run: echo " The job was automatically triggered by a ${{ gitea.event_name }} event."
- run: echo " This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo " The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo " The ${{ gitea.repository }} repository has been cloned to the runner."
- run: echo " The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: echo " This job's status is ${{ job.status }}."