Skip to content

Commit

Permalink
Merge pull request #41 from sail-host/feat/cicd-for-project-testing
Browse files Browse the repository at this point in the history
feat: add github action for frontent testing
  • Loading branch information
Nobody9512 authored Oct 31, 2024
2 parents 54eb320 + 7ff5dbb commit 4adf875
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/back-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Back Testing

on:
push:
branches: ["master", "dev", "feat/*"]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Bun
uses: oven-sh/setup-bun@v2

- name: Build React Project
working-directory: ./web
run: |
bun install
bun run build
- name: Set up Golang
uses: actions/setup-go@v4
with:
go-version: "1.22"

- name: Run tests
run: make test

- name: Build application
run: make prod
31 changes: 31 additions & 0 deletions .github/workflows/front-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Front Testing Types

on:
push:
branches: ["master", "dev", "feat/*"]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Bun
uses: oven-sh/setup-bun@v2

- name: Install dependencies
working-directory: ./web
run: bun install

- name: Lint project
working-directory: ./web
run: bun run lint

- name: Build project
working-directory: ./web
run: bun run build

# - name: Run tests
# working-directory: ./web
# run: bun run test
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ prod:

@echo "Build Linux ARM64"
GOOS=linux GOARCH=arm64 go build -o sailhost-linux-arm64 cmd/main.go
tar -czvf "sailhost-linux-arm64.tar.gz" sailhost-linux-arm64
tar -czvf "sailhost-linux-arm64.tar.gz" sailhost-linux-arm64

test:
go test ./...

0 comments on commit 4adf875

Please sign in to comment.