Skip to content
Open
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
Binary file added .DS_Store
Binary file not shown.
Binary file added .github/.DS_Store
Binary file not shown.
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: ci

on:
pull_request:
branches: [main]

jobs:
tests:
name: Tests
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v6

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.26.0"

- name: Run tests
run: go test ./...
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Make sure you're on Go version 1.22+.
Create a `.env` file in the root of the project with the following contents:

```bash
PORT="8080"
PORT="7979"
```

Run the server:
Expand Down
Binary file added internal/.DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion internal/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
)

var ErrNoAuthHeaderIncluded = errors.New("no authorization header included")
var ErrNoAuthHeaderIncluded = errors.New("Wrong wrong")

// GetAPIKey -
func GetAPIKey(headers http.Header) (string, error) {
Expand Down
8 changes: 8 additions & 0 deletions internal/auth/auth_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package auth

import "testing"

func TestGetAPIKey(t *testing.T) {
// This will immediately fail the test
t.Fatal("Intentional failure to test CI pipeline!")
}