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

Fix CI cache problems #686

Merged
merged 2 commits into from
Oct 10, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,17 @@ jobs:
#ref: "refs/pull/${{ github.event.number }}/merge" # THIS IS INSECURE

- name: Setup Golang with cache
uses: magnetikonline/action-golang-cache@v4
uses: actions/setup-go@v4
with:
go-version-file: go.mod
cache: false

- name: TidyTree
run: if [ "$(go mod tidy && git diff | wc -l)" -gt 0 ]; then exit 1; fi

- name: Format
run: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi

- name: Install dependencies
run: go get -v ./...

- name: Build
run: go build -v ./...

Expand All @@ -67,13 +66,15 @@ jobs:

- name: Build Turso binary
run: go build -o turso cmd/turso/main.go

- name: Integration tests checkout
uses: actions/checkout@v3
with:
repository: chiselstrike/tursotest
ref: 'main'
path: 'tests'
token: ${{ secrets.ACCESS_TOKEN_TO_TESTS }}

- name: Integration Test
run: cd tests && export TURSO_BINARY=../turso && go run cmd/tursotest/main.go -test.v -test.count=1 run integrationtests

18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Turso CLI

[![goreleaser](https://github.com/tursodatabase/turso-cli/actions/workflows/goreleaser.yml/badge.svg)](https://github.com/tursodatabase/turso-cli/actions/workflows/goreleaser.yml)
[![Go](https://github.com/tursodatabase/turso-cli/actions/workflows/go.yml/badge.svg)](https://github.com/tursodatabase/turso-cli/actions/workflows/go.yml)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you removing goreleaser? I think both are useful.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Originally we just used go.yml.

But it always failed because of conflicts when we restored the cache.
Screenshot 2023-10-10 at 8 26 05 AM
This resulted in the errors you see above and also on a red status badge.
That is why @gris changed it to goreleaser.yml a few days ago.

I think a CI badge makes more sense. Meaning that the "last CI run was successful for this project".
I don't see much value in a badge saying "the last release was successful". But I also don't oppose having it.
Let me know if you still want to keep gorereleaser badge and I'll add it back. @gris let me know what you think as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes a lot of sense! Thanks for spotting that

[![License](https://img.shields.io/badge/license-MIT-blue)](https://github.com/tursodatabase/turso-cli/blob/main/LICENSE)

This is the command line interface (CLI) to Turso.

## Documentation

There is [reference documentation](https://docs.turso.tech/reference/turso-cli) available.
There is [reference documentation](https://docs.turso.tech/reference/turso-cli)
available.

For a guided walkthrough, follow the [Turso CLI tutorial](https://docs.turso.tech/tutorials/get-started-turso-cli).
For a guided walkthrough, follow the
[Turso CLI tutorial](https://docs.turso.tech/tutorials/get-started-turso-cli).

## Installation

Expand All @@ -21,7 +23,9 @@ For a guided walkthrough, follow the [Turso CLI tutorial](https://docs.turso.tec
brew install chiselstrike/tap/turso
```

Also remember to configure `homebrew` [shell completions](https://docs.brew.sh/Shell-Completion) if you haven't already done so.
Also remember to configure `homebrew`
[shell completions](https://docs.brew.sh/Shell-Completion) if you haven't
already done so.

To upgrade an existing installation of the CLI, run:

Expand Down Expand Up @@ -58,7 +62,8 @@ turso auth login
```

You are taken to a web page in your default browser to authenticate via GitHub.
After successfully authenticated, `turso auth login` receives an access token that is stored on your settings file.
After successfully authenticated, `turso auth login` receives an access token
that is stored on your settings file.

### Create database

Expand Down Expand Up @@ -120,7 +125,8 @@ turso db destroy <database name>

## Settings

The `turso` program keeps settings in your local machine in the following base directory in `turso/settings.json` file:
The `turso` program keeps settings in your local machine in the following base
directory in `turso/settings.json` file:

| OS | Config directory |
| ----- | ----------------------------------------- |
Expand Down