Skip to content

Commit

Permalink
Improve CI performances - attempt 4 - one job to rule them all
Browse files Browse the repository at this point in the history
  • Loading branch information
asein-sinch committed Oct 1, 2024
1 parent 6f8d992 commit 6314524
Showing 1 changed file with 2 additions and 35 deletions.
37 changes: 2 additions & 35 deletions .github/workflows/run-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,17 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: yarn install --frozen-lockfile
run: yarn install

- name: Run ESLint
run: npx eslint "packages/**/{src,tests}/**/*.ts"

- name: Build project
run: yarn run build

- name: Cache build output
uses: actions/cache@v3
with:
path: |
packages/**/dist
key: ${{ runner.os }}-node-${{ matrix.node-version }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-build-
- name: Run unit tests
run: yarn run test

e2e:
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 18.x, 20.x ]
steps:
- uses: actions/checkout@v3
- name: Checkout sinch-sdk-mockserver repository
uses: actions/checkout@v3
with:
Expand All @@ -52,20 +35,6 @@ jobs:
fetch-depth: 0
path: sinch-sdk-mockserver

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Restore build output
uses: actions/cache@v3
with:
path: |
packages/**/dist
key: ${{ runner.os }}-node-${{ matrix.node-version }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-build-
- name: Install Docker Compose
run: |
sudo apt-get update
Expand Down Expand Up @@ -97,9 +66,7 @@ jobs:
cp sinch-sdk-mockserver/features/voice/*.feature ./packages/voice/tests/e2e/features/
- name: Run e2e tests
run: |
yarn install
yarn run e2e
run: yarn run e2e

sonarcloud:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 6314524

Please sign in to comment.