Skip to content
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
41 changes: 41 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: E2E

on:
push:
branches: [master]
pull_request:
workflow_dispatch:

permissions:
contents: read

# Every run shares the test account's rate limit, so only one run goes at a
# time. A newer pending run replaces an older pending one.
concurrency:
group: e2e-test-account
cancel-in-progress: false

jobs:
e2e:
name: E2E (${{ matrix.os }})
strategy:
fail-fast: false
# The jobs share the test account's rate limit, so running them one at a
# time keeps TestRateLimit's bursts from colliding.
max-parallel: 1
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
# Secrets aren't passed to pull requests from forks, so the tests skip
# themselves when the key is empty.
EMAILABLE_TEST_API_KEY: ${{ secrets.EMAILABLE_TEST_API_KEY }}
steps:
- uses: actions/checkout@v6

- uses: actions/setup-go@v6
with:
go-version-file: go.mod

- name: Test
run: go test -tags e2e -count=1 -v ./e2e
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: build test fmt lint clean run release release-snapshot man
.PHONY: build test test-e2e fmt lint clean run release release-snapshot man

BINARY := emailable
PKG := .
Expand All @@ -10,6 +10,11 @@ build:
test:
go test -race -coverprofile=coverage.txt ./...

# Runs the built binary against the real API. Requires EMAILABLE_TEST_API_KEY
# set to a test key (test_...), which spends no credits.
test-e2e:
go test -tags e2e -count=1 -v ./e2e

fmt:
gofmt -w .

Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,8 @@ Common targets:

- `make build` — compile to `bin/emailable`
- `make test` — run tests with race detector and coverage
- `make test-e2e` — run the built binary against the real API; requires
`EMAILABLE_TEST_API_KEY` set to a test key (`test_...`)
- `make fmt` — format with `gofmt`
- `make lint` — run `golangci-lint`
- `make release VERSION=x.y.z` — bump `plugin.json`, commit, and tag `vx.y.z`
Expand Down
Loading
Loading