Skip to content

Unit test framework + rust improvements #25

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,12 @@ jobs:
node-version: 16
registry-url: https://registry.npmjs.org/
- run: npm install
- run: npm run test
#- run: npm run lint
- run: npm run build

- uses: actions/setup-go@v3
with:
go-version: '1.19'
go-version: "1.19"

- name: Install Apex CLI
run: wget -q https://apexlang.io/install.sh -O - | /bin/bash
Expand All @@ -47,14 +46,12 @@ jobs:
- name: Install swagger-cli
run: npm install -g @apidevtools/swagger-cli

- name: Generator diff test
run: ./diffcheck.sh
working-directory: ./testdata

- name: Validate generated OpenAPI
run: find . -name 'openapi.yaml' -exec swagger-cli validate {} \;
working-directory: ./testdata

- run: npm run test

- name: Is Release?
if: startswith(github.ref, 'refs/tags/v')
run: echo "DEPLOY_PACKAGE=true" >> $GITHUB_ENV
Expand Down
2 changes: 2 additions & 0 deletions definitions/core/index.apex
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ directive @uses(value: [any]) on INTERFACE
directive @nocode on OPERATION

directive @deprecated(value: string?) on INTERFACE | OPERATION

directive @index_type(type: any) on ENUM
16 changes: 16 additions & 0 deletions jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const { defaultsESM: tsjPreset } = require("ts-jest/presets");

module.exports = {
transform: {
"^.+\\.ts$": [
"ts-jest",
{ useESM: true, tsconfig: "./test/tsconfig.test.json" },
],
},
resolver: "ts-jest-resolver",
transformIgnorePatterns: [".*/node_modules/.*"],
testEnvironment: "node",
testRegex: "/test/.*\\.test\\.ts$",
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
extensionsToTreatAsEsm: [".ts"],
};
Loading