Skip to content

fix lint errors

fix lint errors #15

Workflow file for this run

name: SparkIt build
on:
push:
branches:
- main
- final
jobs:
linters-act:
name: linters
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
tests-act:
name: tests
needs: linters-act
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: ImageData
run: cd /home/runner && mkdir imagedata
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...
deploy:
name: Deploy SparkIt
needs: tests-act
runs-on: ubuntu-latest
steps:
- name: Pull Code
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME}}
key: ${{ secrets.PRIVATE_KEY }}
script: cd /home/ubuntu/2024_2_SaraFun/ && git pull
- name: Build containers
uses: appleboy/ssh-action@master
with:
timeout: 10m
host: ${{ secrets.HOST }}
username: ubuntu
key: ${{ secrets.PRIVATE_KEY }}
script: cd /home/ubuntu/2024_2_SaraFun/ && make sparkit-run
- name: Restart service
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ubuntu
key: ${{ secrets.PRIVATE_KEY }}
script: cd /home/ubuntu/2024_2_SaraFun/ && make sparkit-down && make sparkit-run