Skip to content

Commit

Permalink
[ci skip] Add CI workflow (#2)
Browse files Browse the repository at this point in the history
* Add CI workflow

* Add npm run build

* Build on push only

* Get rid of npm ci
  • Loading branch information
nahkd123 committed Jul 8, 2023
1 parent 9e546d9 commit 84e1850
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI Build
on: [push]
jobs:
build-translator:
name: Build Translator
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19
- run: |
npm install
npm run build
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: Translator
path: dist/
test-build:
name: Test 1
runs-on: ubuntu-latest
needs: [build-translator]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19
- name: Download Translator
uses: actions/download-artifact@v3
with:
name: Translator
path: dist/
- name: Build example
run: node dist/cli.js example/example.json
- name: Upload build result
uses: actions/upload-artifact@v3
with:
name: Test Result 1
path: example/compile/
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"translator": "./dist/cli.js"
},
"scripts": {
"test": "node ./dist/cli.js ./example_proj/example.json",
"test": "node ./dist/test.js",
"build": "tsc -b",
"build:watch": "tsc --watch"
},
Expand Down

0 comments on commit 84e1850

Please sign in to comment.