diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml new file mode 100644 index 0000000..1a67e8a --- /dev/null +++ b/.github/workflows/backend.yml @@ -0,0 +1,35 @@ +name: flamingo-armond backend CI + +on: + push: + branches: + - master + + paths: + - 'backend/**' +jobs: + backend: + name: backend CI + runs-on: ubuntu-22.04 + environment: Test + steps: + - name: Set up Go 1.22.5 + uses: actions/setup-go@v5 + with: + go-version: '1.22.5' + + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Goose + run: go install github.com/pressly/goose/v3/cmd/goose@latest + + - name: Fetch dependant Go modules + run: |- + go get -v -t -d ./... + working-directory: ./backend + + - name: Test code + run: |- + go test -v ./... + working-directory: ./backend diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index ed13ece..2b767c6 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -9,6 +9,7 @@ on: jobs: frontend: + name: frontend CI runs-on: ubuntu-22.04 environment: Test steps: diff --git a/backend/db/migrations/20240704123000_create_users_and_todos_tables.sql b/backend/db/migrations/20240704123000_create_users_and_todos_tables.sql index 6663cf2..0b8f9c0 100644 --- a/backend/db/migrations/20240704123000_create_users_and_todos_tables.sql +++ b/backend/db/migrations/20240704123000_create_users_and_todos_tables.sql @@ -20,5 +20,4 @@ CREATE TABLE todos -- SQL section 'Down' is executed when this migration is rolled back. DROP TABLE IF EXISTS todos; - DROP TABLE IF EXISTS users;