Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
rymdlego committed Oct 25, 2024
1 parent 97b5724 commit ed14a13
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 2 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.17', '1.18', '1.19']
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Install Dependencies
run: go mod tidy
- name: Run Unit Tests
run: go test ./... -v
- name: Lint Code
uses: golangci/golangci-lint-action@v3
with:
version: v1.47.0
args: "--timeout 5m0s"
- name: Check Formatting
run: gofmt -l .
environment-test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.18'
- name: Install Dependencies
run: go mod tidy
- name: Set Environment Variables
run: |
echo "NOTES_PATH=$HOME/test_notes" >> $GITHUB_ENV
echo "EDITOR=echo" >> $GITHUB_ENV
echo "NOTES_FILETYPE=md" >> $GITHUB_ENV
echo "NOTES_SCRATCHFILE=scratch" >> $GITHUB_ENV
echo "NOTES_VIEWER=cat" >> $GITHUB_ENV
- name: Run Core Functional Tests
run: |
mkdir -p $NOTES_PATH
go run main.go edit test_note
go run main.go list
echo "Test Content" | go run main.go
go run main.go show scratch
go run main.go git status
- name: Validate Command Outputs
run: |
go run main.go list | grep "test_note"
go run main.go find "test" | grep "test_note"
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@
- Scratch notes functionality for quick note-taking.
- Shell autocompletion for commands and file names (supports Bash, Zsh, Fish, and PowerShell).

## Installation
## Quicky install (requires Go):

```bash
go install github.com/rymdlego/go@latest
```

This will place the executable in $HOME/go/bin or $GOPATH (if you have it set to something else).
Make sure to have that in your $PATH

## The Git clone install (requires Go)

1. Clone the repository:

Expand Down Expand Up @@ -129,7 +138,7 @@ note
You can also pipe content to the scratch note:

```bash
echo "Quick note" | note
echo "Eggs and Avocadoes" | note
```

## Autocompletion
Expand Down

0 comments on commit ed14a13

Please sign in to comment.