Skip to content

Commit f6fbeac

Browse files
Add GitHub action for non-blocking tests (#3)
* Add GitHub Actions workflow for running tests on main and PRs Co-authored-by: me <me@kentcdodds.com> * Remove unnecessary working-directory from npm ci step in tests workflow Co-authored-by: me <me@kentcdodds.com> * Checkpoint before follow-up message * Update Node version and test script in CI workflow Co-authored-by: me <me@kentcdodds.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent 900712f commit f6fbeac

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/workflows/tests.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Tests
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches:
10+
- 'main'
11+
pull_request: {}
12+
13+
jobs:
14+
tests:
15+
name: 🧪 Run Tests
16+
runs-on: ubuntu-latest
17+
# Use continue-on-error to ensure this job doesn't fail the workflow
18+
continue-on-error: true
19+
20+
steps:
21+
- name: ⬇️ Checkout repo
22+
uses: actions/checkout@v4
23+
24+
- name: ⎔ Setup node
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: 24
28+
29+
- name: 📦 Install dependencies
30+
run: npm ci
31+
32+
- name: 🧪 Run tests
33+
id: run_tests
34+
run: node ./epicshop/test.js ..s
35+
continue-on-error: true
36+
37+
- name: 📊 Test results
38+
if: always()
39+
run: |
40+
if [ "${{ steps.run_tests.outcome }}" == "success" ]; then
41+
echo "✅ Tests passed!"
42+
else
43+
echo "❌ Tests failed, but this won't block deployments"
44+
fi

0 commit comments

Comments
 (0)