Skip to content

Commit 0406871

Browse files
committed
chore: fix e2e tests
1 parent b8eb99a commit 0406871

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ jobs:
1818
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
1919
ANDROID_SDK_VERSION: 34
2020
FLUTTER_VERSION: 3.19.3
21-
JDK_VERSION: 17.0.11
21+
JDK_VERSION: 24
22+
JDK_DISTRO: tem
2223
JAVA_OPTIONS: '-Xmx3g'
2324
timeout-minutes: 120
2425
steps:
@@ -36,7 +37,7 @@ jobs:
3637

3738
# Connect your workspace on nx.app and uncomment this to enable task distribution.
3839
# The "--stop-agents-after" is optional, but allows idle agents to shut down once the "e2e" targets have been requested
39-
- run: bunx nx-cloud start-ci-run --distribute-on=".nx/workflows/distribution-config.yaml" --stop-agents-after="e2e-ci" --with-env-vars="ANDROID_SDK_VERSION,FLUTTER_VERSION,JDK_VERSION"
40+
- run: bunx nx-cloud start-ci-run --distribute-on=".nx/workflows/distribution-config.yaml" --stop-agents-after="e2e-ci" --with-env-vars="ANDROID_SDK_VERSION,FLUTTER_VERSION,JDK_VERSION,JDK_DISTRO,JAVA_OPTIONS"
4041

4142
# This line is needed for nx affected to work when CI is running on a PR
4243
- run: git branch --track develop origin/develop || exit 0

.nx/workflows/agents.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,17 +93,19 @@ launch-templates:
9393
source $HOME/.sdkman/bin/sdkman-init.sh
9494
sdk version
9595
96-
jdkVersion="${JDK_VERSION:-21.0.3}"
96+
jdkVersion="${JDK_VERSION:-21.0.6}"
9797
jdkDistro="${JDK_DISTRO:-ms}"
9898
javaVersion="${jdkVersion}-${jdkDistro}"
9999
JAVA_HOME="$HOME/.sdkman/candidates/java/$javaVersion"
100100
101101
if [ ! -d $JAVA_HOME ]; then
102102
echo "⌛️ Installing Java v$javaVersion.."
103-
sdk install java $javaVersion
103+
yes | sdk install java $javaVersion
104104
sdk use java $javaVersion
105105
else
106-
echo "⏭️ Java v$javaVersion already installed. Skipping it"
106+
echo "⏭️ Java v$javaVersion already installed. Making sure it is used"
107+
sdk use java $javaVersion
108+
107109
fi
108110
109111
echo "JAVA_HOME=$JAVA_HOME" >> $NX_CLOUD_ENV

e2e/nx-melos-e2e/tests/nx-melos.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ describe('nx-melos e2e', () => {
5959
const scripts = [
6060
{
6161
name: 'melos-bootstrap',
62-
output: `Successfully ran target melos-bootstrap for project @test-project/source`,
62+
output: `Successfully ran target melos-bootstrap for project @test-project-melos/source`,
6363
},
6464
];
6565

packages/common/testing/utils.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,10 @@ export function octal(value: string | number): number {
7474
}
7575

7676
export function noFormat(str: string) {
77-
return (
78-
str
79-
// Clean output: https://github.com/nrwl/nx/blob/c0fd00df6e4b0a9dcc0f75b0539e0eb7a34dd63d/packages/plugin/src/utils/testing-utils/commands.ts#L40
80-
?.replace(
81-
// eslint-disable-next-line no-control-regex
82-
/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,
83-
''
84-
)
77+
// Remove log colors for fail proof string search
78+
return str?.replace(
79+
// eslint-disable-next-line no-control-regex
80+
/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,
81+
''
8582
);
8683
}

0 commit comments

Comments
 (0)