Skip to content

Commit

Permalink
Add test workflow on github action
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkRunWu committed Dec 12, 2023
1 parent b6b0e75 commit be0af3b
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: actions/setup-go@v4
with:
go-version: stable
- name: Setup local storages
run: |
mkdir -p data.local/
mkdir -p data.local/storage
echo "TEST_PAGESHIP_DATABASE_URL=sqlite:///${PWD}/data.local/test_data.db" >> "$GITHUB_ENV"
echo "TEST_PAGESHIP_STORAGE_URL=file:///${PWD}/data.local/storage" >> "$GITHUB_ENV"
- name: Test
run: go test ./...
env:
TEST_PAGESHIP_HOST_PATTERN: http://*.localtest.me
TEST_PAGESHIP_STORAGE_KEY_PREFIX: pageship/

0 comments on commit be0af3b

Please sign in to comment.