Skip to content

Commit

Permalink
Update components in GitHub Actions (#36669)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed May 4, 2022
1 parent 3e78f0c commit 2012f4e
Show file tree
Hide file tree
Showing 8 changed files with 213 additions and 188 deletions.
331 changes: 181 additions & 150 deletions .github/workflows/build_test_deploy.yml

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions .github/workflows/pull_request_stats.yml
Expand Up @@ -13,18 +13,18 @@ jobs:
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 25

- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
id: docs-change

- name: Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
with:
node-version: 14
node-version: 16
check-latest: true

- name: Install
Expand Down Expand Up @@ -54,7 +54,7 @@ jobs:

- name: Turbo Cache
id: turbo-cache
uses: actions/cache@v2
uses: actions/cache@v3
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
with:
path: .turbo
Expand All @@ -68,7 +68,7 @@ jobs:
# "If there are multiple partial matches for a restore key, the action returns the most recently created cache."
# So we get latest cache
- name: Cache built files
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ./packages/next-target
key: next-swc-cargo-cache-ubuntu-18.04--${{ hashFiles('**/Cargo.lock') }}
Expand All @@ -77,8 +77,8 @@ jobs:
# since the repo's dependencies aren't installed we need
# to install napi globally
- run: npm i -g @napi-rs/cli@1.2.1
- run: npm i -g turbo@1.0.28
- run: npm i -g @napi-rs/cli@2.7.0
- run: npm i -g turbo@1.2.6

- name: Build
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
Expand All @@ -90,7 +90,7 @@ jobs:
TURBO_PROJECT: nextjs

- name: Upload artifact
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3
with:
name: next-swc-dev-binary
path: packages/next-swc/native/next-swc.linux-x64-gnu.node
Expand All @@ -106,14 +106,14 @@ jobs:
needs: build-native-dev
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 25

- run: echo ::set-output name=DOCS_CHANGE::$(node skip-docs-change.js echo 'not-docs-only-change')
id: docs-change

- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }}
with:
name: next-swc-dev-binary
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_react_experimental.yml
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- run: yarn install --frozen-lockfile --check-files
env:
Expand All @@ -19,7 +19,7 @@ jobs:

- run: node run-tests.js --timings --write-timings -g 1/1

- uses: actions/cache@v2
- uses: actions/cache@v3
id: cache-build
with:
path: ./*
Expand All @@ -38,7 +38,7 @@ jobs:
matrix:
group: [1, 2, 3, 4, 5, 6]
steps:
- uses: actions/cache@v2
- uses: actions/cache@v3
id: restore-build
with:
path: ./*
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test_react_next.yml
Expand Up @@ -9,7 +9,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- run: yarn install --frozen-lockfile --check-files
env:
Expand All @@ -19,7 +19,7 @@ jobs:

- run: node run-tests.js --timings --write-timings -g 1/1

- uses: actions/cache@v2
- uses: actions/cache@v3
id: cache-build
with:
path: ./*
Expand All @@ -38,7 +38,7 @@ jobs:
matrix:
group: [1, 2, 3, 4, 5, 6]
steps:
- uses: actions/cache@v2
- uses: actions/cache@v3
id: restore-build
with:
path: ./*
Expand Down
2 changes: 1 addition & 1 deletion errors/no-cache.md
Expand Up @@ -78,7 +78,7 @@ cache:
Using GitHub's [actions/cache](https://github.com/actions/cache), add the following step in your workflow file:

```yaml
uses: actions/cache@v2
uses: actions/cache@v3
with:
# See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node
path: |
Expand Down
20 changes: 0 additions & 20 deletions package.json
Expand Up @@ -181,25 +181,5 @@
},
"engines": {
"node": ">=12.22.0"
},
"turbo": {
"pipeline": {
"build-native": {
"dependsOn": [
"^build-native"
],
"outputs": [
"native/*.node"
]
},
"build-wasm": {
"dependsOn": [
"^build-wasm"
],
"outputs": [
"crates/wasm/pkg/*"
]
}
}
}
}
4 changes: 3 additions & 1 deletion test/integration/chunking/pages/page3.js
@@ -1,5 +1,7 @@
import Link from 'next/link'
import('lodash').then((_) => console.log(_.chunk(['a', 'b', 'c', 'd'], 2)))
import('lodash').then(({ default: _ }) =>
console.log(_.chunk(['a', 'b', 'c', 'd'], 2))
)

const Page = () => {
return (
Expand Down
12 changes: 12 additions & 0 deletions turbo.json
@@ -0,0 +1,12 @@
{
"pipeline": {
"build-native": {
"dependsOn": ["^build-native"],
"outputs": ["native/*.node"]
},
"build-wasm": {
"dependsOn": ["^build-wasm"],
"outputs": ["crates/wasm/pkg/*"]
}
}
}

0 comments on commit 2012f4e

Please sign in to comment.