From 5ab5d5105e5199932021360edd3440a214d411cb Mon Sep 17 00:00:00 2001 From: darkicewolf50 Date: Wed, 2 Apr 2025 16:16:03 -0600 Subject: [PATCH] fixing github actions --- .github/workflows/rust.yml | 39 ++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 936ba66..c177418 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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