Plugin registry github and Smart contract management (#14) #143
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: Build and Test ChainLaunch | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '**/*.md' | |
- 'docs/**' | |
# Set explicit permissions following the principle of least privilege | |
permissions: | |
contents: read # Only need read access to the repository contents | |
jobs: | |
build-and-test: | |
name: Build and Test on Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Build chainlaunch-ui | |
run: | | |
cd web | |
bun install | |
export API_URL="/api" | |
bun run build | |
- name: Upload chainlaunch-ui artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: chainlaunch-ui-dist | |
path: web/dist | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.23.4' | |
cache: true | |
- name: Install dependencies | |
run: | | |
go mod download | |
sudo apt-get update | |
sudo apt-get install -y build-essential | |
- name: Build ChainLaunch | |
run: | | |
go build -v -o chainlaunch ./main.go | |
chmod +x chainlaunch | |
- name: Run unit tests | |
run: go test -v ./... |