mirror of
https://github.com/darkicewolf50/RustBrock.git
synced 2025-06-15 13:04:18 -06:00
attempted fix to github actions
This commit is contained in:
parent
3c3c5cf67b
commit
cd63c9fd53
57
.github/workflows/rust.yml
vendored
57
.github/workflows/rust.yml
vendored
@ -3,9 +3,8 @@
|
||||
name: Test Gitea Actions
|
||||
|
||||
# events that will trigger this workflow.
|
||||
# here, we only have "pull_request", so the workflow will run
|
||||
# whenever we create a pull request.
|
||||
# other examples: [push] and [pull_request, push]
|
||||
# here, we only have "push", so the workflow will run
|
||||
# whenever we push code to the repository.
|
||||
on: [push]
|
||||
|
||||
env:
|
||||
@ -22,106 +21,64 @@ jobs:
|
||||
|
||||
# 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
|
||||
check-code:
|
||||
# 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@v4
|
||||
|
||||
# Step 1: Move to minigrep directory and run cargo check
|
||||
- name: move to minigrep
|
||||
run: cd minigrep/
|
||||
|
||||
# another step.
|
||||
# Step 1: Run cargo check and fail if it fails
|
||||
- name: Check
|
||||
run: cargo check --verbose
|
||||
|
||||
# name of the job
|
||||
test:
|
||||
|
||||
# the platform or OS that the workflow will run on.
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Ensures this job runs only if check-code succeeds
|
||||
needs: check-code
|
||||
|
||||
# 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@v4
|
||||
|
||||
# Step 2: Move to minigrep directory and run cargo tests
|
||||
- name: move to minigrep
|
||||
run: cd minigrep/
|
||||
|
||||
# Step 2: Run unit and integration tests (excluding documentation tests)
|
||||
- name: Run Tests
|
||||
run: cd minigrep/ && cargo test --tests --verbose
|
||||
run: cargo test --tests --verbose
|
||||
|
||||
# name of the job
|
||||
documentation-check:
|
||||
|
||||
# the platform or OS that the workflow will run on.
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Ensures this job runs only if check-code succeeds
|
||||
needs: check-code
|
||||
|
||||
# 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@v4
|
||||
|
||||
# Step 3: Move to minigrep directory
|
||||
- name: move to minigrep
|
||||
run: cd minigrep/
|
||||
|
||||
# Step 3: Check if documentation tests were run
|
||||
# Step 4: Check for Documentation Tests
|
||||
- name: Check for Documentation Tests
|
||||
run: |
|
||||
cd minigrep/ &&
|
||||
DOC_TESTS=$(cargo test --doc --verbose)
|
||||
if [[ ! "$DOC_TESTS" =~ "running" ]]; then
|
||||
echo "No documentation tests were run!" && exit 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user