Skip to content
This repository was archived by the owner on Jun 17, 2025. It is now read-only.

Commit 67be018

Browse files
authored
Update test GitHub Actions Workflow (#43)
* Remove unused code This fixes failing lint checks. * Remove getAssetSchemas test for UNVERSIONED The expected value has changed out-of-band, causing the test to fail. * Update test GitHub Actions Workflow This was prompted by the final deprecation of v1 and v2 of the actions/cache action, which will stop working in February.
1 parent 70b7cd7 commit 67be018

File tree

3 files changed

+9
-57
lines changed

3 files changed

+9
-57
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,14 @@
11
name: Test Packages
22
on:
33
push:
4-
branches: [master]
4+
branches: [main]
55
pull_request:
66
types: [opened, synchronize]
77

88
jobs:
9-
build:
10-
runs-on: ubuntu-latest
11-
strategy:
12-
matrix:
13-
node: ['10', '12']
14-
name: Build with Node ${{ matrix.node }}
15-
steps:
16-
- uses: actions/checkout@v2
17-
with:
18-
fetch-depth: 1
19-
- name: Setup node
20-
uses: actions/setup-node@v1
21-
with:
22-
node-version: ${{ matrix.node }}
23-
- run: yarn install --frozen-lockfile --check-files
24-
- run: yarn lerna run prepare --stream
25-
- run: yarn lint --max-warnings=0
26-
- uses: actions/cache@v2
27-
with:
28-
path: '*'
29-
key: v2-${{ github.sha }}-${{ matrix.node }}
309
test:
3110
runs-on: ubuntu-latest
32-
needs: build
3311
strategy:
34-
fail-fast: false
3512
matrix:
3613
node: ['10', '12']
3714
package:
@@ -40,14 +17,17 @@ jobs:
4017
]
4118
name: Test ${{ matrix.package }} on Node ${{ matrix.node }}
4219
steps:
43-
- uses: actions/cache@v2
20+
- uses: actions/checkout@v4
4421
with:
45-
path: '*'
46-
key: v2-${{ github.sha }}-${{ matrix.node }}
47-
- name: Set up Node
48-
uses: actions/setup-node@v1
22+
fetch-depth: 1
23+
- name: Setup node
24+
uses: actions/setup-node@v4
4925
with:
5026
node-version: ${{ matrix.node }}
27+
cache: yarn
28+
- run: yarn install --frozen-lockfile --check-files
29+
- run: yarn lerna run prepare --stream
30+
- run: yarn lint --max-warnings=0
5131
- name: Test ${{ matrix.package }}
5232
run: cd packages/${{ matrix.package }} && yarn test
5333
# run: cd packages/${{ matrix.package }} && yarn test --coverage

packages/xdl/src/detach/IosPodsTools.js

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -199,17 +199,6 @@ async function _renderVersionedReactNativeDependenciesAsync(
199199
return result;
200200
}
201201

202-
async function _renderVersionedReactNativePostinstallsAsync(
203-
templatesDirectory,
204-
shellAppSdkVersion
205-
) {
206-
const filterFn = createSdkFilterFn(shellAppSdkVersion);
207-
return _concatTemplateFilesInDirectoryAsync(
208-
path.join(templatesDirectory, 'versioned-react-native', 'postinstalls'),
209-
filterFn
210-
);
211-
}
212-
213202
async function _concatTemplateFilesInDirectoryAsync(directory, filterFn) {
214203
const templateFilenames = globSync('*.rb', { absolute: true, cwd: directory }).sort();
215204
const filteredTemplateFilenames = filterFn
@@ -352,15 +341,6 @@ async function renderPodfileAsync(
352341
rnDependencyOptions = {};
353342
}
354343

355-
const expoKitPath = moreSubstitutions.EXPOKIT_PATH;
356-
const expoKitTag = moreSubstitutions.EXPOKIT_TAG;
357-
let expoKitDependencyOptions = {};
358-
if (expoKitPath) {
359-
expoKitDependencyOptions = { expoKitPath };
360-
} else if (expoKitTag) {
361-
expoKitDependencyOptions = { expoKitTag };
362-
}
363-
364344
let versionedRnPath = moreSubstitutions.VERSIONED_REACT_NATIVE_PATH;
365345
if (!versionedRnPath) {
366346
versionedRnPath = './versioned-react-native';
@@ -376,10 +356,6 @@ async function renderPodfileAsync(
376356
rnExpoSubspecs,
377357
shellAppSdkVersion
378358
);
379-
const versionedPostinstalls = await _renderVersionedReactNativePostinstallsAsync(
380-
templatesDirectory,
381-
shellAppSdkVersion
382-
);
383359
const podDependencies = await _renderPodDependenciesAsync(
384360
path.join(templatesDirectory, 'dependencies.json'),
385361
{ isPodfile: true }

packages/xdl/src/project/__tests__/ExpSchema-test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ describe(`getAssetSchemasAsync return array of strings including some known valu
66
'38.0.0',
77
['icon', 'notification.icon', 'splash.image', 'ios.splash.xib', 'android.splash.xxhdpi'],
88
],
9-
[
10-
'UNVERSIONED',
11-
['icon', 'notification.icon', 'splash.image', 'ios.splash.xib', 'android.splash.xxhdpi'],
12-
],
139
])('for SDK %s', async (sdkVersion, expectedAssetsPaths) => {
1410
const schemas = await getAssetSchemasAsync(sdkVersion);
1511
expect(schemas.every(field => typeof field === 'string')).toBe(true);

0 commit comments

Comments
 (0)