Commit Graph

23 Commits

Author SHA1 Message Date
Alfi Maulana
3ca3a29821
refactor: remove main function and move its content to top level (#298) 2024-04-15 21:22:35 +08:00
Alfi Maulana
f06670a909
test: utilize new flat ESLint configuration (#294)
* test: utilize new flat ESLint configuration

* test: add TypeScript support to new flat ESLint config

* test: fix `@typescript-eslint/consistent-indexed-object-style` lint issue
2024-04-12 22:55:35 +08:00
Alfi Maulana
d83693c521
feat: remove redundant specification of CMake source directory (#273)
* feat: remove setting the default of `source-dir` to `.`

* feat: append source dir to configure Cmake args only if specified
2024-03-25 14:03:03 +08:00
Alfi Maulana
6c4e2145fb
test: utilize partial test case inputs in cmake.test.ts (#272) 2024-03-25 12:52:35 +08:00
Alfi Maulana
21ddda7def
fix: fix default build dir not relative to source dir (#269)
* test: fix get action inputs test when source dir specified

* fix: default build dir should relative to source dir

* ci: fix test directory location
2024-03-25 12:25:14 +08:00
Alfi Maulana
5c7d8af23f
test: specify Action inputs testing one by one (#268)
* test: refactor testing in `inputs.test.ts`

* test: simplify mocking in `inputs.test.ts` testing

* test: use test case in `inputs.test.ts` testing

* test: add more test cases in `inputs.test.ts` testing
2024-03-25 11:58:49 +08:00
Alfi Maulana
0df49588a5
refactor: add CMake execution functions (#263)
* refactor: add `configureProject` function from lines in `main` function

* test: add test for `configureProject` function

* refactor: add `buildProject` function from lines in `main` function
2024-03-24 23:41:08 +08:00
Alfi Maulana
4427f0f36d
feat: remove support for auto-install Ninja (#258)
* feat: remove support for auto-installing Ninja

* ci: add step for setting up Ninja in `test-action-with-custom-tools` job

* docs: update readme related to auto-install Ninja support removal
2024-03-22 18:14:44 +08:00
Alfi Maulana
ebf367c0a0
feat: remove support for testing CMake projects (#256)
* feat: remove `run-test` and `test-args` action inputs

* docs: remove description for supporting testing
2024-03-22 17:06:56 +08:00
Alfi Maulana
f948a9da23
test: reimplement unit testing (#229)
* test: add test for `getInputs` function

* ci(test): add `test-package` job
2024-03-08 21:20:32 +07:00
Alfi Maulana
30c1178974
feat: add function for getting action inputs (#225)
* feat: add `getInputs` function

* feat: specify default input value in `getInputs` function
2024-03-04 22:53:41 +08:00
Alfi Maulana
d37829ef6a
build: build distribution files directly from TypeScript files (#221)
* build: build dist directly from TypeScript sources

* build(ts): adjust options in `tsconfig.json`

* fix: import all instead of default in @actions modules
2024-03-04 21:16:05 +08:00
Alfi Maulana
e0f6aeea02
refactor: rename source files extension to .ts (#219) 2024-03-04 21:01:48 +08:00
Alfi Maulana
28146ffccf
ci: remove unit testing (#198)
* ci(test): remove `test-package` job

* test: remove testing using Jest

* test(eslint): remove `parserOptions` entry
2024-02-16 13:13:16 +07:00
Alfi Maulana
dd9fe54799
feat: catch error when calling the main function (#138) 2023-12-14 19:37:47 +08:00
Alfi Maulana
65845a480e
build: adjust source files structures (#136)
* build(typescript): disable from generating source map

* build(typescript): disable from generating declaration file

* build(typescript): modify source files to be compiled to the same dir

* build(typescript): modify distribution files to be generated to `dist` directory

* refactor: rename main entrypoint from `main` to `index`

* chore(git): specify attribute for `dist` directory instead of just `dist/index.mjs`
2023-12-14 19:20:50 +08:00
Alfi Maulana
96089ee386
test: write test in JavaScript (#108)
* test: map imported module from the distribution files

* chore: remove @jest/globals, @types/jest, and ts-jest from dependencies

* test: modify test files to JavaScript

* test: remove `testMatch` option in Jest (redundant)

* build: remove `tsconfig.eslint.json`

* ci(test): set `--experimental-vm-modules` only on `Test Package` step instead
2023-12-11 20:38:06 +08:00
Alfi Maulana
dd1c44061d
feat: install Ninja if it was not available (#82)
* feat: install Ninja if generator is Ninja

* feat: only install ninja if it was not installed
2023-11-21 20:45:38 +07:00
Alfi Maulana
025d277e55
feat: pass more arguments during CMake configuration (#78)
* feat: parse and pass `generator` input

* feat: parse and pass `c-compiler` and `cxx-compiler` inputs

* feat: parse and pass `c-flags` and `cxx-flags` inputs

* feat: parse and pass `options` input

* feat: parse and pass `args` input
2023-11-20 21:52:38 +07:00
Alfi Maulana
1829bd6347
feat: run CTest from the JavaScript Action (#77)
* feat: run CTest if `run-test` is true

* feat: run CMake build if `run-test` set to true
2023-11-20 21:19:04 +07:00
Alfi Maulana
421f12e1db
feat: run CMake build from the JavaScript Action (#75)
* feat: add CMake build step

* feat: only run CMake build step if `run-build` input is true

* feat: pass `build-args` input to the CMake build command

* fix: split lines from `getMultilineInput` with a whitespace
2023-11-20 20:51:25 +07:00
Alfi Maulana
48cb08d783
feat: configure CMake from the JavaScript Action (#72)
* feat(action): modify to run `main/index.mjs` on Node 20

* feat: add configure cmake step

* feat: output build directory

* feat: get `source-dir` and `build-dir` inputs
2023-11-20 20:18:21 +07:00
Alfi Maulana
ed7c2d179c
build: initialize JavaScript Action project (#69)
* build: initialize JavaScript action project

* chore(dependabot): check for npm package updates

* style: ignore `main` dir and `README.md` from being formatted

* ci: add Build workflow that contains Build Package job

* ci: add Test Package job in the Test workflow

* test: add an empty `main.test.ts` test

* chore: adjust Git attributes for `main/index.mjs` file

* docs(readme): add a build status badge
2023-11-20 18:25:22 +07:00