Skip to content

Commit

Permalink
chore: experiment with workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Dec 23, 2024
1 parent 67ffe0f commit 5f17bb7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/experiment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Workflow experiment

on:
pull_request:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install dependencies
run: npm install
- name: Run ESLint
run: npm run eslint
if: true
- name: Run Prettier
run: npm run prettier
if: true && !cancelled()
- name: Run TypeScript
run: npm run check-types
if: true && !cancelled()
3 changes: 2 additions & 1 deletion src/__tests__/index.test.js → src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ describe('testing the module', () => {
expect(testLib()).toBe(42);
});
it('should increment', () => {
expect(value).toBe(0);
const expected: string = 0;

Check failure on line 10 in src/__tests__/index.test.ts

View workflow job for this annotation

GitHub Actions / deploy

Type 'number' is not assignable to type 'string'.

Check failure on line 10 in src/__tests__/index.test.ts

View workflow job for this annotation

GitHub Actions / nodejs / lint-check-types

Type 'number' is not assignable to type 'string'.
expect(value).toBe(expected);
incrementValue();
expect(value).toBe(1);
incrementValue();
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Returns a very important number.
* @returns {number} - The number.
*/
export default function theDefaultExport() {
export default function the_DefaultExport() {

Check failure on line 5 in src/index.js

View workflow job for this annotation

GitHub Actions / deploy

Identifier 'the_DefaultExport' is not in camel case

Check failure on line 5 in src/index.js

View workflow job for this annotation

GitHub Actions / nodejs / lint-eslint

Identifier 'the_DefaultExport' is not in camel case
return 42;
}

Expand Down

0 comments on commit 5f17bb7

Please sign in to comment.