Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adapt edge-bundler repo #5599

Merged
merged 16 commits into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ commands:
keys:
- npm-{{ arch }}-v1-{{ checksum "package-lock.json" }}
- npm-{{ arch }}-v1
- run: curl -fsSL https://deno.land/install.sh | sh -s -- v1.42.3
- run: << parameters.command >>
- save_cache:
key: npm-{{ arch }}-v1-{{ checksum "package-lock.json" }}
Expand Down
5 changes: 5 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ const config = {
'packages/framework-info/test/fixtures/**',
'packages/framework-info/dist/**',
'packages/*/lib/**',

'packages/edge-bundler/deno/**/*',
'packages/edge-bundler/node/vendor/**',
'packages/edge-bundler/test/deno/**/*',
'packages/edge-bundler/test/fixtures/**/*',
],
rules: {
// -----------------------------------------------------------
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@ jobs:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: ['*']
# Must include the minimum deno version from the `DENO_VERSION_RANGE` constant in `node/bridge.ts`.
deno-version: ['v1.37.0', 'v1.x']
include:
- os: ubuntu-latest
node-version: '14.16.0'
deno-version: 'v1.x'
fail-fast: false
steps:
# Sets an output parameter if this is a release PR
Expand All @@ -79,6 +82,13 @@ jobs:
- name: Install npm@7
run: npm install -g npm@7
if: ${{ matrix.node-version == '14.16.0' && !steps.release-check.outputs.IS_RELEASE }}
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno-version }}
if: ${{ !steps.release-check.outputs.IS_RELEASE }}
- name: Setup Deno dependencies
run: deno cache https://deno.land/x/[email protected]/eszip.ts
- name: Set up Go
uses: actions/setup-go@v4
with:
Expand All @@ -99,6 +109,50 @@ jobs:
retry_on: error
command: npx nx affected --target=test:ci --exclude=@netlify/build --parallel=3

test-edge-bundler-integration:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
node-version: [14.16.0, '*']
exclude:
- os: macOS-latest
node-version: 14.16.0
- os: windows-latest
node-version: 14.16.0
fail-fast: false
steps:
# Sets an output parameter if this is a release PR
- name: Check for release
id: release-check
# For windows we have to use $env:
run: |-
echo "IS_RELEASE=true" >> $GITHUB_OUTPUT
echo "IS_RELEASE=true" >> $env:GITHUB_OUTPUT
if: ${{ startsWith(github.head_ref, 'release-') }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we could extract this into an own custom action that checks for releases as we have this on every workflow job.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but let's do that in a separate PR if it will ever bother us that much.

- uses: actions/checkout@v3
with:
fetch-depth: 0
if: ${{ !steps.release-check.outputs.IS_RELEASE }}
- uses: nrwl/nx-set-shas@v3
if: ${{ !steps.release-check.outputs.IS_RELEASE }}
- name: Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
if: ${{ !steps.release-check.outputs.IS_RELEASE }}
- name: Install npm@7
run: npm install -g npm@7
if: ${{ matrix.node-version == '14.16.0' && !steps.release-check.outputs.IS_RELEASE }}
- name: Install dependencies
run: npm ci
if: ${{ !steps.release-check.outputs.IS_RELEASE }}
- name: Test
run: npx lerna run test:integration --scope @netlify/edge-bundler
lukasholzer marked this conversation as resolved.
Show resolved Hide resolved
if: ${{ !steps.release-check.outputs.IS_RELEASE }}

test-build:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
Expand Down
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
# don't format fixtures (sometimes faulty behaviour is desired)
packages/*/tests/**/fixtures/**
packages/*/test/**/fixtures/**
packages/framework-info/test/fixtures/**
# don't lint outputs
packages/*/lib
# don't lint deno files
packages/edge-bundler/deno/**
# don't lint vendored files
packages/edge-bundler/*/vendor/**
# don't lint changelog files as they get auto-generated
CHANGELOG.md
coverage
Loading
Loading