Skip to content

Commit

Permalink
Create test_workflow.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblogan authored Sep 10, 2024
1 parent 0ec2265 commit 1a9ce8d
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/test_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Test Failure
on:
workflow_dispatch

env:
API_FILE: 'src/pages/index.tsx'

jobs:
TestWorkflow:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Setup Node.js 20
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 20.x
- name: update file
run: |
echo "$(date + '%Y-%m-%d %H:%M:%S')" > src/pages/index.tsx
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
# Check if the API Docs have been updated
- name: Check for updated api docs
id: api_docs_updated
run: |
if git diff --cached --quiet -- ${{ env.API_FILE }}; then
echo "API docs have not changed"
echo "::set-output name=updated::false"
else
echo "::set-output name=updated::true"
echo "API docs have been updated"
fi
# Fail this step if api docs have not been updated but continue running the workflow
- name: API Docs not updated
if: steps.api_docs_updated.outputs.updated == 'false'
run: |
echo "API Docs Have not been updated if API changes have been made please verify they are in the release"
exit 1
continue-on-error: true

- name: NEXT STEP
run: |
echo "This is the final STEP"

0 comments on commit 1a9ce8d

Please sign in to comment.