mirror of
https://github.com/darkicewolf50/RustBrock.git
synced 2025-06-15 13:04:18 -06:00
fix actions
This commit is contained in:
parent
0e0e0ea857
commit
1338d4f994
42
.github/workflows/rust.yml
vendored
42
.github/workflows/rust.yml
vendored
@ -1,16 +1,12 @@
|
|||||||
# name of the workflow.
|
# name of the workflow.
|
||||||
# this is optional.
|
# this is optional.
|
||||||
name: Rust Checking and Testing
|
name: Test Gitea Actions
|
||||||
|
|
||||||
# events that will trigger this workflow.
|
# events that will trigger this workflow.
|
||||||
# here, we only have "pull_request", so the workflow will run
|
# here, we only have "pull_request", so the workflow will run
|
||||||
# whenever we create a pull request.
|
# whenever we create a pull request.
|
||||||
# other examples: [push] and [pull_request, push]
|
# other examples: [push] and [pull_request, push]
|
||||||
on:
|
on: [push]
|
||||||
push: # testing out the job
|
|
||||||
branches: [ "master" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
@ -19,6 +15,29 @@ env:
|
|||||||
# jobs run in parallel by default (we can change that).
|
# jobs run in parallel by default (we can change that).
|
||||||
# each job groups together a series of steps to accomplish a purpose.
|
# each job groups together a series of steps to accomplish a purpose.
|
||||||
jobs:
|
jobs:
|
||||||
|
# name of the job
|
||||||
|
first:
|
||||||
|
# the platform or OS that the workflow will run on.
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
# series of steps to finish the job.
|
||||||
|
steps:
|
||||||
|
# name of the step.
|
||||||
|
# steps run sequentially.
|
||||||
|
# this is optionale
|
||||||
|
- name: checkout
|
||||||
|
# each step can either have "uses" or "run".
|
||||||
|
# "uses" run an action written somewhere other than this workflow .
|
||||||
|
# usually from the community.
|
||||||
|
# this action checks out the repo code to the runner (instance)
|
||||||
|
# running the action
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
# another step.
|
||||||
|
# this step runs a bash (Ubuntu's default shell) command
|
||||||
|
- name: list files
|
||||||
|
run: ls
|
||||||
|
|
||||||
# name of the job
|
# name of the job
|
||||||
check-code:
|
check-code:
|
||||||
# the platform or OS that the workflow will run on.
|
# the platform or OS that the workflow will run on.
|
||||||
@ -36,6 +55,9 @@ jobs:
|
|||||||
# this action checks out the repo code to the runner (instance)
|
# this action checks out the repo code to the runner (instance)
|
||||||
# running the action
|
# running the action
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: move to minigrep
|
||||||
|
run: cd minigrep/
|
||||||
|
|
||||||
# another step.
|
# another step.
|
||||||
# Step 1: Run cargo check and fail if it fails
|
# Step 1: Run cargo check and fail if it fails
|
||||||
@ -63,6 +85,9 @@ jobs:
|
|||||||
# this action checks out the repo code to the runner (instance)
|
# this action checks out the repo code to the runner (instance)
|
||||||
# running the action
|
# running the action
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: move to minigrep
|
||||||
|
run: cd minigrep/
|
||||||
|
|
||||||
# Step 2: Run unit and integration tests (excluding documentation tests)
|
# Step 2: Run unit and integration tests (excluding documentation tests)
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
@ -89,6 +114,9 @@ jobs:
|
|||||||
# this action checks out the repo code to the runner (instance)
|
# this action checks out the repo code to the runner (instance)
|
||||||
# running the action
|
# running the action
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: move to minigrep
|
||||||
|
run: cd minigrep/
|
||||||
|
|
||||||
# Step 3: Check if documentation tests were run
|
# Step 3: Check if documentation tests were run
|
||||||
- name: Check for Documentation Tests
|
- name: Check for Documentation Tests
|
||||||
@ -96,4 +124,4 @@ jobs:
|
|||||||
DOC_TESTS=$(cargo test --doc --verbose)
|
DOC_TESTS=$(cargo test --doc --verbose)
|
||||||
if [[ ! "$DOC_TESTS" =~ "running" ]]; then
|
if [[ ! "$DOC_TESTS" =~ "running" ]]; then
|
||||||
echo "No documentation tests were run!" && exit 1
|
echo "No documentation tests were run!" && exit 1
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user