diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..90f9fd7 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,44 @@ +name: Tests + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + push: + branches: + - 'main' + pull_request: {} + +jobs: + tests: + name: ๐Ÿงช Run Tests + runs-on: ubuntu-latest + # Use continue-on-error to ensure this job doesn't fail the workflow + continue-on-error: true + + steps: + - name: โฌ‡๏ธ Checkout repo + uses: actions/checkout@v4 + + - name: โŽ” Setup node + uses: actions/setup-node@v4 + with: + node-version: 24 + + - name: ๐Ÿ“ฆ Install dependencies + run: npm ci + + - name: ๐Ÿงช Run tests + id: run_tests + run: node ./epicshop/test.js ..s + continue-on-error: true + + - name: ๐Ÿ“Š Test results + if: always() + run: | + if [ "${{ steps.run_tests.outcome }}" == "success" ]; then + echo "โœ… Tests passed!" + else + echo "โŒ Tests failed, but this won't block deployments" + fi \ No newline at end of file