Skip to content

Commit

Permalink
[MS-780] ci: Improve CI
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrgrundas committed Oct 16, 2024
1 parent 6871a24 commit 7c7fc47
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 11 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Code quality

on:
pull_request:
branches: ["*"]

jobs:
tests-and-linters:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9.10.0
run_install: false

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"

- name: Install dependencies
run: pnpm --version && pnpm install --frozen-lockfile

- name: Check prettier
run: pnpm lint:prettier

- name: Check eslint
run: pnpm lint:eslint

- name: Check types
run: pnpm lint:tsc

- name: Check coverage
run: |
COVERAGE="$(pnpm --silent test:coverage:avg)"
echo "Average coverage: ${RESULT}"
11 changes: 1 addition & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Linters and tests
name: Tests

on:
pull_request:
Expand All @@ -25,14 +25,5 @@ jobs:
- name: Install dependencies
run: pnpm --version && pnpm install --frozen-lockfile

- name: Check prettier
run: pnpm lint:prettier

- name: Check eslint
run: pnpm lint:eslint

- name: Check types
run: pnpm lint:tsc

- name: Run tests
run: pnpm test
2 changes: 1 addition & 1 deletion src/lib/graphql/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe("helpers", () => {
expect(getOperationName(document)).toBe("");
});

test.only("should return the correct operation names when there are multiple operations", () => {
test("should return the correct operation names when there are multiple operations", () => {
const document = `
query GetUser {
user(id: "1") {
Expand Down

0 comments on commit 7c7fc47

Please sign in to comment.