LogParser Tests #1559
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: LogParser Tests | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '*/10 * * * *' | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
permissions: | |
contents: write | |
actions: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '16' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests and save results | |
run: | | |
echo "===== Running Manual Tests =====" | |
mkdir -p test | |
echo "Test Results Summary" > test/test-results.txt | |
echo "===================" >> test/test-results.txt | |
echo "Timestamp: $(date)" >> test/test-results.txt | |
echo "User: dax-side" >> test/test-results.txt | |
echo "" >> test/test-results.txt | |
echo "Test Execution Results:" >> test/test-results.txt | |
echo "Executing npm run test:manual..." | |
npm run test:manual >> test/test-results.txt 2>&1 || { | |
echo "ERROR: Manual tests failed! Check test/test-results.txt for details." | |
cat test/test-results.txt | |
exit 1 | |
} | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results-$(date +%Y%m%d-%H%M%S) | |
path: test/test-results.txt | |
retention-days: 14 | |
compression-level: 6 | |
overwrite: true | |
if-no-files-found: warn | |
- name: Push test results | |
if: github.event_name != 'pull_request' | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git pull origin main | |
git add test/test-results.txt | |
git commit -m "test: update results from CI run | |
Timestamp: $(date) | |
User: dax-side | |
- Store test execution results | |
- Update test results file | |
- CI run: ${GITHUB_RUN_ID}" || echo "No changes to commit" | |
git push | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |