-
Notifications
You must be signed in to change notification settings - Fork 591
chore: add new PR workflow #2866
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
Draft
david-luna
wants to merge
37
commits into
open-telemetry:main
Choose a base branch
from
david-luna:dluna-ci-pr-speed-and-coverage
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 26 commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
9cf880a
chore: add new PR workflow
david-luna 58702ed
chore: test ci:changed scripts
david-luna 5b4e1b4
chore: upload test artifacts
david-luna 294b6e4
chore: add logs in coverage step
david-luna 780ffcd
chore: add job dependency
david-luna de2e6ef
chore: fix dependencies in jobs
david-luna ad59caf
chore: add missing steps to coverage job
david-luna c019193
chore: remove other PR workflows
david-luna 4d13f2e
chore: add some logs in pr workflow
david-luna 5d79d66
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna f57c5c5
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna 368d918
chore: rename scripts
david-luna 85013e8
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna 1211d78
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna 90262a6
Merge branch 'dluna-ci-pr-speed-and-coverage' of github.com:david-lun…
david-luna 652af62
chore: add coverage merge script
david-luna 17ea030
fix: use the new affected scripts
david-luna 03e8c67
chore: update amqplib test script
david-luna 0254c12
chore: update scripts
david-luna 2479414
chore: revert cucumber instr changes
david-luna cbedab6
chore: add more plugins to coverage
david-luna 22b32f2
chore: add another batch of instrumentations
david-luna a75ac50
chore: add another round of instrumentations
david-luna 48612c0
chore: add another chunk of instrumentations
david-luna 939bec9
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna ddca5a1
chore: add codecov action with dry_run
david-luna 855e679
chore: add flags script
david-luna ad14f95
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna d8068be
chore: update codecov.yml
david-luna 444bee8
chore: rename job to match PR checks
david-luna e9e1648
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna 6f2b9a7
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna 7254591
Merge branch 'dluna-ci-pr-speed-and-coverage' of github.com:david-lun…
david-luna 3257370
chore: rename coverage script
david-luna 51afb3e
Merge branch 'main' into dluna-ci-pr-speed-and-coverage
david-luna 1ed7097
chore: add missign peer dependenciy for tav tests in pino
david-luna 0896c53
chore: add tav command to debug
david-luna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
name: Unit Tests | ||
name: Pull Request Tests | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
# TODO: remove it | ||
branches: [main] | ||
|
||
jobs: | ||
build-and-cache: | ||
|
@@ -23,8 +23,9 @@ jobs: | |
node-version: 18 | ||
- name: Install | ||
run: npm ci | ||
- name: Build | ||
run: npm run compile | ||
# TODO: check if compiling only the affected modules is correct | ||
- name: Compile (Delta) | ||
run: npm run compile:ci:affected | ||
- name: Upload Build Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -34,7 +35,7 @@ jobs: | |
if-no-files-found: error | ||
retention-days: 1 | ||
|
||
unit-test: | ||
unit-and-tav-test: | ||
needs: build-and-cache | ||
strategy: | ||
fail-fast: false | ||
|
@@ -45,9 +46,6 @@ jobs: | |
- "20.6.0" | ||
- "20" | ||
- "22" | ||
include: | ||
- node: 18 | ||
code-coverage: true | ||
runs-on: ubuntu-latest | ||
services: | ||
memcached: | ||
|
@@ -185,54 +183,97 @@ jobs: | |
with: | ||
name: tests-build-cache-${{ github.run_number }} | ||
path: .nx | ||
- name: Build | ||
run: npm run compile | ||
- name: Unit tests (Full) | ||
if: matrix.code-coverage | ||
run: npm run test | ||
- name: Compile (Delta) | ||
run: npm run compile:ci:affected | ||
- name: Unit tests (Delta) | ||
if: ${{ !matrix.code-coverage }} | ||
run: npm run test:ci:changed | ||
- name: Report Coverage | ||
if: ${{ matrix.code-coverage && !cancelled()}} | ||
uses: codecov/codecov-action@v5 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
run: npm run test:ci:affected | ||
- name: Test All Versions (Delta) | ||
run: npm run test-all-versions:ci:affected | ||
- name: Upload Test Artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
verbose: true | ||
name: tests-coverage-cache-${{ github.run_number }}-${{ matrix.node }} | ||
include-hidden-files: true | ||
if-no-files-found: error | ||
retention-days: 1 | ||
path: | | ||
!node_modules | ||
**/.nyc_output/** | ||
|
||
browser-test: | ||
needs: build-and-cache | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node: ["22"] | ||
test-coverage-report: | ||
runs-on: ubuntu-latest | ||
env: | ||
NPM_CONFIG_UNSAFE_PERM: true | ||
NODE_OPTIONS: --max-old-space-size=4096 | ||
needs: unit-and-tav-test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
node-version: 18 | ||
- name: Install | ||
run: npm ci | ||
- name: Download Build Artifacts | ||
# TODO: add the rest of versions (18.19.0 & 20.6.0)? or are these enough?? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if easy to do we could also use these for completeness, but just using 18 and 20 is likely more than okay 🙂 |
||
- name: Download Test Artifacts (18) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: tests-build-cache-${{ github.run_number }} | ||
path: .nx | ||
- name: Build | ||
run: npm run compile | ||
- name: Unit tests | ||
run: npm run test:browser | ||
name: tests-coverage-cache-${{ github.run_number }}-18 | ||
path: . | ||
- name: Download Test Artifacts (20) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: tests-coverage-cache-${{ github.run_number }}-20 | ||
path: . | ||
- name: Download Test Artifacts (22) | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: tests-coverage-cache-${{ github.run_number }}-22 | ||
path: . | ||
- name: Merge coverage (Delta) | ||
run: npm run coverage:merge:ci:affected | ||
- name: Check coverage | ||
run: find . | grep coverage-final | ||
|
||
- name: Report Coverage | ||
uses: codecov/codecov-action@v5 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
verbose: true | ||
dry_run: true | ||
|
||
# browser-test: | ||
# needs: build-and-cache | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# node: ["22"] | ||
# runs-on: ubuntu-latest | ||
# env: | ||
# NPM_CONFIG_UNSAFE_PERM: true | ||
# NODE_OPTIONS: --max-old-space-size=4096 | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# with: | ||
# fetch-depth: 0 | ||
# - uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: ${{ matrix.node }} | ||
# - name: Install | ||
# run: npm ci | ||
# - name: Download Build Artifacts | ||
# uses: actions/download-artifact@v4 | ||
# with: | ||
# name: tests-build-cache-${{ github.run_number }} | ||
# path: .nx | ||
# - name: Build | ||
# run: npm run compile | ||
# - name: Unit tests | ||
# run: npm run test:browser | ||
# - name: Report Coverage | ||
# uses: codecov/codecov-action@v5 | ||
# env: | ||
# CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
# with: | ||
# verbose: true |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keeping the name
unit-test
would help with repo settings, since unit-test (18) and unit-test (18.19.0) required checks. Repo managment is now automated from another repo, so changing the check's name would require us to open a PR in that other repo before merging this (which would then block other PRs from getting merged)If we want to change the name we can do so in a smaller follow-up PR. :)