-
Notifications
You must be signed in to change notification settings - Fork 27k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'canary' into next-docs-migrate
- Loading branch information
Showing
175 changed files
with
2,787 additions
and
4,021 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 |
---|---|---|
@@ -1,13 +1,20 @@ | ||
FROM node:16-bullseye | ||
FROM ubuntu:22.04 | ||
|
||
LABEL com.github.actions.name="Next.js PR Stats" | ||
LABEL com.github.actions.description="Compares stats of a PR with the main branch" | ||
LABEL repository="https://github.com/vercel/next-stats-action" | ||
|
||
COPY . /next-stats | ||
|
||
RUN apt update && apt upgrade -y | ||
RUN apt install unzip wget curl nano htop screen build-essential pkg-config libssl-dev git build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libreadline-dev libffi-dev python3 moreutils jq iproute2 openssh-server sudo whois dnsutils -y | ||
|
||
RUN ln $(which python3) /usr/bin/python | ||
|
||
RUN curl -sfLS https://install-node.vercel.app/v18 | bash -s -- -f | ||
|
||
# Install node_modules | ||
RUN npm i -g [email protected] | ||
RUN npm i -g [email protected] [email protected] | ||
RUN cd /next-stats && pnpm install --production | ||
|
||
RUN git config --global user.email 'stats@localhost' | ||
|
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
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
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,65 @@ | ||
name: 'Rust Setup' | ||
description: 'Sets up the Rust toolchain for CI' | ||
inputs: | ||
targets: | ||
description: 'Comma-separated list of target triples to install for this toolchain' | ||
required: false | ||
components: | ||
description: 'Comma-separated list of components to be additionally installed' | ||
required: false | ||
skip-install: | ||
description: 'Sets environment variables without installing the rust toolchain' | ||
required: false | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: 'Get toolchain version from file' | ||
id: file | ||
shell: bash | ||
run: echo "toolchain=$(cat ./rust-toolchain)" >> $GITHUB_OUTPUT | ||
|
||
- shell: bash | ||
run: | | ||
: force toolchain version | ||
echo "RUST_TOOLCHAIN=${{ steps.file.outputs.toolchain }}" >> $GITHUB_ENV | ||
- shell: bash | ||
run: | | ||
: disable incremental compilation | ||
if [ -z "${CARGO_INCREMENTAL+set}" ]; then | ||
echo CARGO_INCREMENTAL=0 >> $GITHUB_ENV | ||
fi | ||
- shell: bash | ||
run: | | ||
: enable colors in Cargo output | ||
if [ -z "${CARGO_TERM_COLOR+set}" ]; then | ||
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV | ||
fi | ||
- shell: bash | ||
run: | | ||
: enable rust backtrace | ||
if [ -z "${RUST_BACKTRACE+set}" ]; then | ||
echo RUST_BACKTRACE=short >> $GITHUB_ENV | ||
fi | ||
- shell: bash | ||
run: | | ||
: enable faster cargo sparse registry | ||
if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" ]; then | ||
echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV | ||
fi | ||
- name: 'Setup Rust toolchain' | ||
uses: dtolnay/rust-toolchain@master | ||
if: ${{ !inputs.skip-install }} | ||
with: | ||
toolchain: ${{ steps.file.outputs.toolchain }} | ||
targets: ${{ inputs.targets }} | ||
components: ${{ inputs.components }} | ||
|
||
- name: 'Add cargo problem matchers' | ||
shell: bash | ||
run: echo "::add-matcher::${{ github.action_path }}/matchers.json" |
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,44 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "cargo-common", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(warning|warn|error)(?:\\[(\\S*)\\])?: (.*)$", | ||
"severity": 1, | ||
"code": 2, | ||
"message": 3 | ||
}, | ||
{ | ||
"regexp": "^(?:[\\s->=]*(.*):(\\d*):(\\d*)|.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "cargo-test", | ||
"pattern": [ | ||
{ | ||
"regexp": "^.*panicked\\s+at\\s+'(.*)',\\s+(.*):(\\d+):(\\d+)$", | ||
"message": 1, | ||
"file": 2, | ||
"line": 3, | ||
"column": 4 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "rustfmt", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(Diff in (\\S+)) at line (\\d+):", | ||
"message": 1, | ||
"file": 2, | ||
"line": 3 | ||
} | ||
] | ||
} | ||
] | ||
} |
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
Oops, something went wrong.