-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup initial CI pipeline for testing, linting, and type checking.
- Loading branch information
1 parent
35c629a
commit 573b692
Showing
14 changed files
with
1,166 additions
and
603 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: "" | ||
labels: "" | ||
assignees: "" | ||
--- | ||
|
||
<!-- | ||
Sentry/Codecov employees and contractors can delete or ignore the following. | ||
--> | ||
|
||
# 📣 Feedback / 🐛 Bugs | ||
|
||
Do you want to file a bug report and/or feature request for Codecov? [Please use our feedback repo instead](https://github.com/codecov/feedback/issues). |
This file contains 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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: "" | ||
labels: "" | ||
assignees: "" | ||
--- | ||
|
||
<!-- | ||
Sentry/Codecov employees and contractors can delete or ignore the following. | ||
--> | ||
|
||
# 📣 Feedback / 🐛 Bugs | ||
|
||
Do you want to file a bug report and/or feature request for Codecov? [Please use our feedback repo instead](https://github.com/codecov/feedback/issues). |
This file contains 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Description | ||
|
||
# Code Example | ||
|
||
# Notable Changes | ||
|
||
<!-- | ||
Sentry/Codecov employees and contractors can delete or ignore the following. | ||
--> | ||
|
||
# Legal Boilerplate | ||
|
||
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. |
This file contains 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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: cleanup caches by a branch | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
cleanup: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cleanup | ||
run: | | ||
gh extension install actions/gh-actions-cache | ||
REPO=${{ github.repository }} | ||
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge" | ||
echo "Fetching list of cache key" | ||
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 ) | ||
## Setting this to not fail the workflow while deleting cache keys. | ||
set +e | ||
echo "Deleting caches..." | ||
for cacheKey in $cacheKeysForPR | ||
do | ||
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm | ||
done | ||
echo "Done" | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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 |
---|---|---|
@@ -0,0 +1,209 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- staging | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
install: | ||
name: Install deps | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- name: Cache node_modules | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-codecov-js-bundle-plugin-node-modules | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}- | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
lint: | ||
name: Run Lint | ||
runs-on: ubuntu-latest | ||
needs: install | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- name: Cache node_modules | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-codecov-js-bundle-plugin-node-modules | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}- | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build packages | ||
run: pnpm run build | ||
|
||
- name: Run linter | ||
run: pnpm run lint | ||
|
||
type-check: | ||
name: Run Type Checker | ||
runs-on: ubuntu-latest | ||
needs: install | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- name: Cache node_modules | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-codecov-js-bundle-plugin-node-modules | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}- | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build packages | ||
run: pnpm run build | ||
|
||
- name: Run TSC | ||
run: pnpm run type-check | ||
|
||
unit-test: | ||
name: Run Unit Tests | ||
runs-on: ubuntu-latest | ||
needs: install | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
with: | ||
version: 8 | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- name: Cache node_modules | ||
id: cache-node-modules | ||
uses: actions/cache@v3 | ||
env: | ||
cache-name: cache-codecov-js-bundle-plugin-node-modules | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-${{ env.cache-name }}- | ||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Build packages | ||
run: pnpm run build | ||
|
||
- name: Run unit tests | ||
run: pnpm run test:unit:ci --maxWorkers=2 | ||
|
||
# fossa: | ||
# name: Run Fossa | ||
# runs-on: ubuntu-latest | ||
# needs: install | ||
# if: ${{ !github.event.pull_request.head.repo.fork && github.repository_owner == 'codecov' }} | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
|
||
# - name: Setup Node | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: '18.8.0' | ||
|
||
# - name: Run Fossa | ||
# uses: fossas/[email protected] | ||
# with: | ||
# api-key: ${{secrets.FOSSA_API_KEY}} |
This file contains 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 |
---|---|---|
|
@@ -29,6 +29,6 @@ | |
"extends": "../../package.json" | ||
}, | ||
"engines": { | ||
"node": ">=20.0.0" | ||
"node": ">=18.0.0" | ||
} | ||
} | ||
} |
This file contains 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 |
---|---|---|
|
@@ -28,6 +28,6 @@ | |
"extends": "../../package.json" | ||
}, | ||
"engines": { | ||
"node": ">=20.0.0" | ||
"node": ">=18.0.0" | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.