-
Notifications
You must be signed in to change notification settings - Fork 635
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix CI caching issues and linter errors (#6232)
* fix lint * hehe * iconValue can't be undefined * add missing checkout step * remove prefer offline bc is deprecated * add mising env vars step * add missing permissions * remove extra chars * prevent cancel in progress for linter * remove concurrency for linting --------- Co-authored-by: Bruno Barbieri <[email protected]>
- Loading branch information
1 parent
61c9d54
commit b38351a
Showing
4 changed files
with
57 additions
and
19 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 |
---|---|---|
|
@@ -64,8 +64,16 @@ jobs: | |
# Job for linting and unit tests | ||
linting-and-unit-tests: | ||
runs-on: ["self-hosted"] | ||
permissions: | ||
contents: read | ||
needs: install-deps | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up github keys | ||
run: git config core.sshCommand "ssh -i ~/.ssh/id_ed25519 -F /dev/null" | ||
|
||
- name: Set sanitized branch name | ||
id: sanitize | ||
run: echo "SANITIZED_REF_NAME=${GITHUB_REF_NAME//\//-}" >> $GITHUB_ENV | ||
|
@@ -74,6 +82,17 @@ jobs: | |
with: | ||
name: yarn-cache-${{ env.SANITIZED_REF_NAME }} | ||
path: .yarn | ||
- name: Set up ENV vars & scripts | ||
env: | ||
CI_SCRIPTS: ${{ secrets.CI_SCRIPTS }} | ||
run: | | ||
source ~/.zshrc | ||
git clone [email protected]:rainbow-me/rainbow-env.git | ||
mv rainbow-env/dotenv .env && rm -rf rainbow-env | ||
eval $CI_SCRIPTS | ||
- name: Install dependencies | ||
run: | | ||
yarn install && yarn setup | ||
- name: Check for frozen lockfile | ||
run: ./scripts/check-lockfile.sh | ||
|
@@ -93,9 +112,20 @@ jobs: | |
# iOS build and e2e tests | ||
e2e-ios: | ||
runs-on: ["self-hosted"] | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
timeout-minutes: 60 | ||
needs: install-deps | ||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up github keys | ||
run: git config core.sshCommand "ssh -i ~/.ssh/id_ed25519 -F /dev/null" | ||
|
||
- name: Set sanitized branch name | ||
id: sanitize | ||
run: echo "SANITIZED_REF_NAME=${GITHUB_REF_NAME//\//-}" >> $GITHUB_ENV | ||
|
@@ -104,6 +134,17 @@ jobs: | |
with: | ||
name: yarn-cache-${{ env.SANITIZED_REF_NAME }} | ||
path: .yarn | ||
- name: Set up ENV vars & scripts | ||
env: | ||
CI_SCRIPTS: ${{ secrets.CI_SCRIPTS }} | ||
run: | | ||
source ~/.zshrc | ||
git clone [email protected]:rainbow-me/rainbow-env.git | ||
mv rainbow-env/dotenv .env && rm -rf rainbow-env | ||
eval $CI_SCRIPTS | ||
- name: Install dependencies | ||
run: | | ||
yarn install && yarn setup | ||
- name: Rebuild detox cache | ||
run: ./node_modules/.bin/detox clean-framework-cache && ./node_modules/.bin/detox build-framework-cache | ||
|
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,9 @@ | ||
type NonFalsy<T> = T extends false | 0 | '' | null | undefined | 0n ? never : T; | ||
|
||
interface Array<T> { | ||
filter<S extends T>(predicate: BooleanConstructor, thisArg?: any): NonFalsy<S>[]; | ||
} | ||
|
||
interface ReadonlyArray<T> { | ||
filter<S extends T>(predicate: BooleanConstructor, thisArg?: any): NonFalsy<S>[]; | ||
} |
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