mirror of
https://github.com/hi-language/transpiler.git
synced 2026-01-14 00:28:05 +00:00
Feat: Add GitHub Action workflow for tests
This commit is contained in:
34
.github/workflows/test.yml
vendored
Normal file
34
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
name: Run Hi Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Set up Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
id: run-tests
|
||||||
|
run: npm test
|
||||||
|
continue-on-error: true
|
||||||
|
|
||||||
|
- name: Commit test results
|
||||||
|
uses: stefanzweifel/git-auto-commit-action@v5
|
||||||
|
with:
|
||||||
|
commit_message: "Docs: Update test results"
|
||||||
|
file_pattern: test-results.md
|
||||||
|
|
||||||
|
- name: Check test step outcome
|
||||||
|
if: steps.run-tests.outcome == 'failure'
|
||||||
|
run: exit 1
|
||||||
Reference in New Issue
Block a user