Skip to content
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

chore: experiment with workflow #20

Closed
wants to merge 2 commits into from
Closed
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
25 changes: 25 additions & 0 deletions .github/workflows/experiment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Workflow experiment

on:
pull_request:

jobs:
lint:
name: Linters
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 @@
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 / Linters

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 / Linters

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
Loading