-
Notifications
You must be signed in to change notification settings - Fork 3
92 lines (71 loc) · 2.27 KB
/
ci.yml
File metadata and controls
92 lines (71 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: CI Pipeline
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
setup_and_build:
runs-on: ubuntu-latest
env:
MY_API_KEY: ${{ secrets.MY_API_KEY }}
GROK_API_KEY: ${{ secrets.GROK_API_KEY }}
GEMINI_PRO_API_KEY: ${{ secrets.GEMINI_PRO_API_KEY }}
REPLICATE_API_TOKEN: ${{ secrets.REPLICATE_API_TOKEN }}
CLOUDINARY_URL: ${{ secrets.CLOUDINARY_URL }}
YOUTUBE_DEVELOPER_KEY: ${{ secrets.YOUTUBE_DEVELOPER_KEY }}
TESSDATA_PREFIX: "/usr/local/bin/tesseract"
FAST_API_BASE_URL: "http://0.0.0.0:8000"
PORT: 9000
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.22.4"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y make
- name: Install ffmpeg
run: sudo apt-get install -y ffmpeg
- name: Install Python 3.11
run: |
sudo apt-get update
sudo apt-get install -y python3.11 python3.11-venv python3.11-dev python3.11-distutils
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
python3 --version
- name: Set up Python environment
run: |
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
- name: Install Python dependencies
run: |
source venv/bin/activate
pip install -r ./python/requirements.txt
- name: Fetch dependencies
run: make deps
- name: Format code
run: make fmt
- name: Build
run: make build
- name: Test
run: make test
- name: Echo Go version
run: go version
- name: Install golint
run: go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- name: Go lint
run: make lint
- name: Install gosec
run: go install github.com/securego/gosec/v2/cmd/gosec@latest
- name: Security Scan
run: make security-scan
- name: Go Report Card
uses: creekorful/goreportcard-action@v1.0