diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..dc248b4 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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/ \ No newline at end of file diff --git a/package.json b/package.json index 8728348..24d5285 100644 --- a/package.json +++ b/package.json @@ -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" },