mirror of
https://github.com/darkicewolf50/RustBrock.git
synced 2025-06-15 13:04:18 -06:00
fixing github actions
This commit is contained in:
parent
cd63c9fd53
commit
5ab5d5105e
39
.github/workflows/rust.yml
vendored
39
.github/workflows/rust.yml
vendored
@ -1,6 +1,6 @@
|
||||
# name of the workflow.
|
||||
# this is optional.
|
||||
name: Test Gitea Actions
|
||||
name: Test Rust Actions
|
||||
|
||||
# events that will trigger this workflow.
|
||||
# here, we only have "push", so the workflow will run
|
||||
@ -16,10 +16,8 @@ env:
|
||||
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: checkout
|
||||
uses: actions/checkout@v3
|
||||
@ -31,54 +29,59 @@ jobs:
|
||||
check-code:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# series of steps to finish the job.
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Step 1: Move to minigrep directory and run cargo check
|
||||
- name: move to minigrep
|
||||
run: cd minigrep/
|
||||
# Step 1: Move to minigrep directory and list files to debug
|
||||
- name: Move to minigrep and list files
|
||||
run: |
|
||||
cd minigrep/
|
||||
ls -la # This will list the contents of the minigrep directory to ensure it's correct
|
||||
|
||||
- name: Check
|
||||
run: cargo check --verbose
|
||||
run: |
|
||||
cd minigrep/ # Make sure we're in the correct directory
|
||||
cargo check --verbose
|
||||
|
||||
# name of the job
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Ensures this job runs only if check-code succeeds
|
||||
needs: check-code
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Step 2: Move to minigrep directory and run cargo tests
|
||||
- name: move to minigrep
|
||||
run: cd minigrep/
|
||||
- name: Move to minigrep and list files
|
||||
run: |
|
||||
cd minigrep/
|
||||
ls -la # Debugging step to ensure we're in the right directory
|
||||
|
||||
- name: Run Tests
|
||||
run: cargo test --tests --verbose
|
||||
run: |
|
||||
cd minigrep/
|
||||
cargo test --tests --verbose
|
||||
|
||||
# name of the job
|
||||
documentation-check:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Ensures this job runs only if check-code succeeds
|
||||
needs: check-code
|
||||
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Step 3: Move to minigrep directory
|
||||
- name: move to minigrep
|
||||
run: cd minigrep/
|
||||
- name: Move to minigrep and list files
|
||||
run: |
|
||||
cd minigrep/
|
||||
ls -la # Debugging step to ensure we're in the right directory
|
||||
|
||||
# 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