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

feat: move unit tests from Circleci to Github actions #25570

Merged
merged 26 commits into from
Jul 5, 2024
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
d39b4a5
feat: run-unit-tests
itsyoboieltr Jun 27, 2024
f353ab5
fix: add corepack enable
itsyoboieltr Jun 28, 2024
a399875
fix: corepack enable
itsyoboieltr Jun 28, 2024
b678880
fix: remove unit tests from config
itsyoboieltr Jun 28, 2024
9b8917e
fix: add pr action types
itsyoboieltr Jun 28, 2024
ce18831
fix: setup nodejs
itsyoboieltr Jun 28, 2024
766a339
Merge branch 'develop' into move-unit-tests-to-github-actions
itsyoboieltr Jul 1, 2024
335744f
feat: add codecov upload
itsyoboieltr Jul 1, 2024
697f8ec
fix: test
itsyoboieltr Jul 1, 2024
6b03bd3
fix: add token and fail on error
itsyoboieltr Jul 1, 2024
c082f24
Merge branch 'develop' into move-unit-tests-to-github-actions
itsyoboieltr Jul 2, 2024
0cc1a57
Merge branch 'develop' into move-unit-tests-to-github-actions
itsyoboieltr Jul 2, 2024
9711df5
Update config.yml
itsyoboieltr Jul 2, 2024
042fe6f
feat: setup-environment reusable workflow
itsyoboieltr Jul 3, 2024
4b3f0cd
fix: checkout
itsyoboieltr Jul 3, 2024
ce890f9
Update run-unit-tests.yml
itsyoboieltr Jul 3, 2024
97eb64e
fix: composite action
itsyoboieltr Jul 3, 2024
6814ed1
Update action.yml
itsyoboieltr Jul 3, 2024
c6a4933
Update action.yml
itsyoboieltr Jul 3, 2024
6f6fbf6
Update config.yml
itsyoboieltr Jul 3, 2024
32cdf03
Update action.yml
itsyoboieltr Jul 3, 2024
62c2e93
Update action.yml
itsyoboieltr Jul 3, 2024
e63bc82
Update run-unit-tests.yml
itsyoboieltr Jul 3, 2024
0438fc4
Merge branch 'develop' into move-unit-tests-to-github-actions
itsyoboieltr Jul 3, 2024
15797c2
Update run-unit-tests.yml
itsyoboieltr Jul 3, 2024
d1be009
fix: add warning
itsyoboieltr Jul 4, 2024
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
Prev Previous commit
Next Next commit
feat: setup-environment reusable workflow
  • Loading branch information
itsyoboieltr committed Jul 3, 2024
commit 042fe6f2cc3aa55756eda3fe01171c67a69b5eee
50 changes: 3 additions & 47 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -8,24 +8,10 @@ jobs:
test-unit-jest:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- run: corepack enable

- name: Checkout repository
uses: actions/checkout@v4
- uses: ./.github/workflows/setup-environment.yml

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
run: yarn --immutable
- name: test:coverage:jest:dev
run: yarn test:coverage:jest:dev

- name: test:coverage:jest
run: yarn test:coverage:jest
@@ -34,33 +20,3 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true

test-unit-jest-development:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- run: corepack enable

- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
run: yarn --immutable

- name: test:coverage:jest:dev
run: yarn test:coverage:jest:dev

- uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
35 changes: 35 additions & 0 deletions .github/workflows/setup-environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Setup environment

on:
workflow_call:
inputs:
fetch-depth:
description: Number of commits to fetch. 0 indicates all history for all branches and tags.
default: 1
required: false
type: number

jobs:
setup-environment:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- run: corepack enable

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: ${{ inputs.fetch-depth }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: yarn

- name: Install dependencies
run: yarn --immutable