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

Replace asdf with mise #98

Merged
merged 3 commits into from
Feb 22, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 2 additions & 14 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: docker compose up bigquery -d
- uses: asdf-vm/actions/setup@v3
- id: asdf-cache
uses: actions/cache@v4
with:
path: ~/.asdf/
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
- uses: asdf-vm/actions/install@v3
if: steps.asdf-cache.outputs.cache-hit != 'true'
with:
before_install: |
rm ~/.asdf/.tool-versions
asdf install golang latest
asdf global golang latest
- uses: jdx/mise-action@v2
- name: Find go cache dir
id: go-cache
run: |
Expand All @@ -59,7 +47,7 @@ jobs:
echo "checking for diff after running formatters, if this fails, run 'make fmt'"
git diff --exit-code --name-only
- id: go_version
run: echo "go_version=$(asdf current golang | awk '{print $2}')" >> $GITHUB_OUTPUT
run: echo "go_version=$(mise current go)" >> $GITHUB_OUTPUT
- uses: nais/platform-build-push-sign@main
id: build-push-sign
with:
Expand Down
19 changes: 5 additions & 14 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- run: docker compose up bigquery -d
- uses: asdf-vm/actions/setup@v3
- id: asdf-cache
uses: actions/cache@v4
with:
path: ~/.asdf/
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
- uses: asdf-vm/actions/install@v3
if: steps.asdf-cache.outputs.cache-hit != 'true'
with:
before_install: |
rm ~/.asdf/.tool-versions
asdf install golang latest
asdf global golang latest
- uses: jdx/mise-action@v2
- name: Find go cache dir
id: go-cache
run: |
Expand Down Expand Up @@ -58,8 +46,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: jdx/mise-action@v2
with:
cache_key_prefix: "pr_bp_"
- id: go_version
run: echo "go_version=$(cat .tool-versions | grep golang | awk '{print $2}')" >> $GITHUB_OUTPUT
run: echo "go_version=$(mise current go)" >> $GITHUB_OUTPUT
- uses: nais/platform-build-push-sign@main
id: build-push-sign
with:
Expand Down
6 changes: 0 additions & 6 deletions .tool-versions

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NAIS API is the main entrypoint when interacting with the API of the NAIS platfo
## Local development

```bash
asdf install # Install required dependencies, see .tool-versions for plugins used
mise install # Install required dependencies
cp .env.example .env # Copy example configuration file, and adjust to your needs
docker compose up -d
make setup-local # Setup local environment (seeds database and creates pubsub topic)
Expand Down
10 changes: 10 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[settings]
pin = true

[tools]
go = "1.24.0"
helm = "3.17.1"
node = "lts"
protoc = "29.3"
protoc-gen-go = "1.36.4"
protoc-gen-go-grpc = "cmd/protoc-gen-go-grpc/v1.5.1"
Loading