fix: sqlite issue on testing #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy to Railway | |
on: | |
push: | |
branches: | |
- main # Runs when pushing to the main branch | |
jobs: | |
build-test: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.23 # Match your Go version | |
- name: Install dependencies | |
run: go mod download | |
- name: Run tests | |
run: go test -v ./... | |
deploy: | |
name: Deploy to Railway | |
needs: build-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Deploy to Railway | |
env: | |
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }} | |
run: | | |
curl -fsSL https://railway.app/install.sh | sh | |
railway login --token $RAILWAY_TOKEN | |
railway up --service main |