-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds CI for Positron extension (#307)
- Loading branch information
Showing
10 changed files
with
140 additions
and
11 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
10 changes: 7 additions & 3 deletions
10
.github/workflows/extensions.yaml → .github/workflows/jupyterlab.yaml
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,29 @@ | ||
name: Positron | ||
on: | ||
workflow_call: | ||
jobs: | ||
native: | ||
env: | ||
DOCKER: false | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
runner: [macos-latest, windows-latest, ubuntu-latest] | ||
runs-on: ${{ matrix.runner }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: extractions/setup-just@v1 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
- run: just positron ci | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: ./.github/actions/setup | ||
- run: just positron ci |
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 |
---|---|---|
@@ -1,6 +1,5 @@ | ||
out | ||
dist | ||
node_modules | ||
.vscode-test-web/ | ||
.vscode-test/ | ||
*.vsix | ||
5 |
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,77 @@ | ||
alias c := clean | ||
alias i := install | ||
alias t := test | ||
|
||
_ci := env_var_or_default("CI", "false") | ||
|
||
_debug := env_var_or_default("DEBUG", "false") | ||
|
||
_with_debug := if _debug == "true" { | ||
"set -x pipefail" | ||
} else { | ||
"" | ||
} | ||
|
||
# Executes continuous integration workflow (i.e., this is what GitHub Actions uses) | ||
ci: | ||
#!/usr/bin/env bash | ||
set -eou pipefail | ||
{{ _with_debug }} | ||
just install | ||
just lint | ||
just test | ||
|
||
# Deletes ephemeral project files (i.e., cleans the project). | ||
clean: | ||
#!/usr/bin/env bash | ||
set -eou pipefail | ||
{{ _with_debug }} | ||
rm -rf node_modules | ||
|
||
default: | ||
#!/usr/bin/env bash | ||
set -eou pipefail | ||
{{ _with_debug }} | ||
just install | ||
just test | ||
|
||
|
||
# Install dependencies | ||
install: | ||
#!/usr/bin/env bash | ||
set -eou pipefail | ||
{{ _with_debug }} | ||
npm install | ||
|
||
# Performs static code analysis with ESLint | ||
lint: | ||
#!/usr/bin/env bash | ||
set -eou pipefail | ||
{{ _with_debug }} | ||
npm run lint | ||
|
||
# Executes commands via `npm`. Equivalent to `npm run`. Provides arbitrary command chaining inside of Docker from project root (i.e., `just positron run test`) | ||
run *args: | ||
#!/usr/bin/env bash | ||
set -eou pipefail | ||
{{ _with_debug }} | ||
npm run {{ args }} | ||
|
||
|
||
# Executes npm test | ||
test: | ||
#!/usr/bin/env bash | ||
set -eou pipefail | ||
{{ _with_debug }} | ||
if [ {{ os() }} == "linux" ]; then | ||
xvfb-run -a npm test | ||
else | ||
npm test | ||
fi |
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