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

refactor(ci): macOS support and more fixes #12

Merged
merged 45 commits into from
Dec 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
d738a72
feat(tests): local e2e suite runer
Yohe-Am Dec 11, 2023
342017e
fix(action): installer uri from path
Yohe-Am Dec 11, 2023
5beb159
fix(action): installer uri from path bug
Yohe-Am Dec 11, 2023
d0d7f6f
fix(action): installer uri from path bug 2
Yohe-Am Dec 11, 2023
b293576
fix(action): installer uri from path bug 3
Yohe-Am Dec 11, 2023
f0939f1
fix(action): installer uri from path bug 4
Yohe-Am Dec 11, 2023
ea518d0
fix(action): installer uri from path bug 5
Yohe-Am Dec 11, 2023
c78080e
fix(action): pre-commit version
Yohe-Am Dec 11, 2023
9c853e1
fix(ci): os matrix typo
Yohe-Am Dec 11, 2023
fd88974
fix(ci): missing env var
Yohe-Am Dec 11, 2023
09906cd
refactor(ports): move from zipjs to jszip
Yohe-Am Dec 11, 2023
edfad98
fix(tests): remove ls test (has no version flag on macos)
Yohe-Am Dec 11, 2023
8b8e364
fix(ci): add missing macos packages
Yohe-Am Dec 11, 2023
5322a02
fix(ci): quote brew versions
Yohe-Am Dec 11, 2023
1c21e3c
fix(ci): try shorter version strings
Yohe-Am Dec 11, 2023
9b2e42e
fix(ci): remove version pinning for brew
Yohe-Am Dec 11, 2023
17a2401
wip: add more printf
Yohe-Am Dec 11, 2023
e66c2a3
wip: better printf
Yohe-Am Dec 11, 2023
6ff93da
refactor(ports): replace most bits with dax
Yohe-Am Dec 11, 2023
6848dee
fix: bugs
Yohe-Am Dec 11, 2023
fc9473c
fix: one more unarchive dedgecase
Yohe-Am Dec 11, 2023
e649704
fix: whiz mac tar issues
Yohe-Am Dec 12, 2023
e8ce9a1
fix: disable mold test on mac
Yohe-Am Dec 12, 2023
efd5236
dummy commit for ci
Yohe-Am Dec 12, 2023
1e854c8
fix: use tar prog for mold
Yohe-Am Dec 12, 2023
8528be2
fix: cargo binstall port bug
Yohe-Am Dec 12, 2023
c42c5e2
fix: ld symlink for mold
Yohe-Am Dec 12, 2023
8184c9c
fix: replaceLd flag for mold
Yohe-Am Dec 12, 2023
b25b359
fix: user version var in action
Yohe-Am Dec 12, 2023
92cd571
fix: even more wasmedge issue
Yohe-Am Dec 12, 2023
f5216cc
fix: posix incompatiblity in loader
Yohe-Am Dec 12, 2023
6632920
feat(installer,cli): contained lockfile and print commands
Yohe-Am Dec 13, 2023
7158847
fix: ruff artifact file format change
Yohe-Am Dec 13, 2023
b78da26
fix: minor fixes
Yohe-Am Dec 13, 2023
0d86cc7
fix: typo
Yohe-Am Dec 13, 2023
48d5a56
wip: js action
Yohe-Am Dec 14, 2023
101bd17
fix: version prefix bug
Yohe-Am Dec 14, 2023
8d584bd
fix: deno install location
Yohe-Am Dec 14, 2023
7c9f1b5
fix(ci): revert bad changes
Yohe-Am Dec 14, 2023
e13cfce
fix(ci): fix perm bug in action
Yohe-Am Dec 14, 2023
a84087f
feat(ci): ghjk dir caching
Yohe-Am Dec 14, 2023
ce42f0d
fix: post cache action
Yohe-Am Dec 14, 2023
01c6cb8
fix: strange bug on cache dirs
Yohe-Am Dec 14, 2023
fa94f50
fix: merge action artifacts into one
Yohe-Am Dec 14, 2023
9d53229
refactor: remove `gh_action`
Yohe-Am Dec 15, 2023
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
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
groups:
actions-minor:
update-types:
- minor
- patch
32 changes: 22 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- ready_for_review

env:
DENO_VERSION: "1.38.2"
DENO_VERSION: "1.38.5"

jobs:
changes:
Expand All @@ -29,14 +29,29 @@ jobs:
- uses: pre-commit/[email protected]

test-e2e:
runs-on: ubuntu-latest
runs-on: "${{ matrix.os }}"
strategy:
matrix:
include:
- os: ubuntu-latest
e2eType: "docker"
- os: macos-latest
e2eType: "local"
# - os: windows-latest
# e2eType: "local"
env:
GHJK_TEST_E2E_TYPE: ${{ matrix.e2eType }}
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- uses: docker/setup-buildx-action@v3
- uses: actions-hub/docker/cli@master
- if: "${{ matrix.os == 'macos-latest' }}"
run: brew install fish zsh
- if: "${{ matrix.e2eType == 'docker' }}"
uses: docker/setup-buildx-action@v3
- if: "${{ matrix.e2eType == 'docker' }}"
uses: actions-hub/docker/cli@master
env:
SKIP_LOGIN: true
- run: deno task test
Expand All @@ -45,15 +60,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
- uses: metatypedev/setup-ghjk@v1
with:
deno-version: ${{ env.DENO_VERSION }}
- uses: ./
id: ghjk-action
installer-url: ./install.ts
env:
GHJK_CONFIG: ./examples/protoc/ghjk.ts
- shell: bash
run: |
- run: |
cd examples/protoc
. $BASH_ENV
protoc --version
11 changes: 8 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ repos:
rev: v4.5.0
hooks:
- id: check-added-large-files
exclude: gh_action/dist/.*.js
- id: check-ast
- id: check-json
exclude: .vscode/.*\.json
Expand All @@ -13,14 +14,18 @@ repos:
- id: check-merge-conflict
- id: end-of-file-fixer
# exclude all generated files
exclude: (deno.lock)
exclude: |
(?x)^(
deno.lock|
gh_action/.*.js
)$
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.0
hooks:
- id: check-dependabot
- id: check-github-workflows
- repo: https://github.com/commitizen-tools/commitizen
rev: 3.10.0
rev: v3.13.0
hooks:
- id: commitizen
stages:
Expand All @@ -44,7 +49,7 @@ repos:
- id: deno-lint
name: Deno lint
language: system
entry: bash -c 'deno task lint'
entry: bash -c 'deno lint'
pass_filenames: false
types:
- ts
9 changes: 2 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ and looks as follows (abstracting away some implementation details):
- detects any violation of the enforced rules
- [ ] `ghjk list`: list installed tools and versions
- [ ] `ghjk outdated`: list outdated tools
- [ ]`ghjk cleanup`: remove unused tools and versions
- [ ] `ghjk cleanup`: remove unused tools and versions

## Extending `ghjk`

Expand All @@ -69,15 +69,10 @@ and looks as follows (abstracting away some implementation details):
## todo

- multiple version of the same package (e.g. rust stable and rust nighted)
- [x] wasmedge
- [x] jco
- [ ] python with virtual env dir
- poetry
- pre-commit
- [x] pnpm
- [x] mold
- [x] wasm-tools
- [x] cargo-insta
- [ ] rust toolchain
- hash verifiable dependencies (timestamp)
- hide the `Deno` object in an abstraction
- support windows
Expand Down
31 changes: 0 additions & 31 deletions action.yml

This file was deleted.

10 changes: 10 additions & 0 deletions check.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import "./setup_logger.ts";
import { $ } from "./utils/mod.ts";

const files = (await Array.fromAsync(
$.path(import.meta.url).parentOrThrow().expandGlob("**/*.ts", {
exclude: ["./gh_action"],
}),
)).map((ref) => ref.path.toString());

await $`${Deno.execPath()} check ${files}`;
15 changes: 11 additions & 4 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
{
"tasks": {
// "test": "DOCKER_SOCK=/var/run/docker.sock deno test --unstable --allow-env=DOCKER_SOCK --allow-read=/var/run/docker.sock --allow-write=/var/run/docker.sock tests/*"
"test": "deno test --fail-fast --parallel --unstable --allow-run=docker,sudo,which,ls,tar,git,curl,unzip --allow-read --allow-env tests/*",
"test": "deno test --fail-fast --parallel --unstable -A tests/*",
"cache": "deno cache deps/*",
"check": "deno check *.ts **/*.ts",
"lint": "deno lint --ignore=ghjk.ts,play.ts --rules-exclude=no-explicit-any"
"check": "deno run -A check.ts"
},
"fmt": {
"exclude": ["gh_action/*.js"]
},
"lint": {
"exclude": ["gh_action/*", "ghjk.ts", "play.ts"],
"rules": {
"exclude": ["no-explicit-any"]
}
}
}
Loading