diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000000..48d448d2db5 Binary files /dev/null and b/.DS_Store differ diff --git a/.github/.DS_Store b/.github/.DS_Store new file mode 100644 index 00000000000..2461d76245e Binary files /dev/null and b/.github/.DS_Store differ diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000000..43d841f43fd --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 ./... diff --git a/README.md b/README.md index c2bec0368b7..f4e3001f386 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/internal/.DS_Store b/internal/.DS_Store new file mode 100644 index 00000000000..a6c0cdbff47 Binary files /dev/null and b/internal/.DS_Store differ diff --git a/internal/auth/auth.go b/internal/auth/auth.go index f969aacf638..e6a542924cf 100644 --- a/internal/auth/auth.go +++ b/internal/auth/auth.go @@ -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) { diff --git a/internal/auth/auth_test.go b/internal/auth/auth_test.go new file mode 100644 index 00000000000..ade99690ec2 --- /dev/null +++ b/internal/auth/auth_test.go @@ -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!") +} \ No newline at end of file