mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-10-28 22:58:10 +08:00
update workflows files.
This commit is contained in:
parent
72aca1ebb8
commit
002cdde001
103
.github/workflows/codeql-analysis.yml
vendored
103
.github/workflows/codeql-analysis.yml
vendored
@ -1,76 +1,67 @@
|
|||||||
# Copyright © 2023 OpenIM open source community. All rights reserved.
|
# For most projects, this workflow file will not need changing; you simply need
|
||||||
|
# to commit it to your repository.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# You may wish to alter this file to override the set of languages analyzed,
|
||||||
# you may not use this file except in compliance with the License.
|
# or to provide custom queries or build logic.
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
#
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
# ******** NOTE ********
|
||||||
#
|
# We have attempted to detect the languages in your repository. Please check
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
# the `language` matrix defined below to confirm you have the correct set of
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
# supported CodeQL languages.
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
|
|
||||||
|
name: "CodeQL"
|
||||||
name: "OpenIM Code Scanning - Action"
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [ main ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [main]
|
# The branches below must be a subset of the branches above
|
||||||
|
branches: [ main ]
|
||||||
schedule:
|
schedule:
|
||||||
# ┌───────────── minute (0 - 59)
|
- cron: '18 19 * * 6'
|
||||||
# │ ┌───────────── hour (0 - 23)
|
|
||||||
# │ │ ┌───────────── day of the month (1 - 31)
|
|
||||||
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
|
|
||||||
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
|
|
||||||
# │ │ │ │ │
|
|
||||||
# │ │ │ │ │
|
|
||||||
# │ │ │ │ │
|
|
||||||
# * * * * *
|
|
||||||
- cron: '30 1 * * 0'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
CodeQL-Build:
|
analyze:
|
||||||
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
|
name: Analyze
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
permissions:
|
strategy:
|
||||||
# required for all workflows
|
fail-fast: false
|
||||||
security-events: write
|
matrix:
|
||||||
|
language: [ 'go' ]
|
||||||
# only required for workflows in private repositories
|
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
||||||
actions: write
|
# Learn more:
|
||||||
contents: write
|
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v3
|
||||||
# Override language selection by uncommenting this and choosing your languages
|
with:
|
||||||
with:
|
languages: ${{ matrix.language }}
|
||||||
languages: go
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
# By default, queries listed here will override any specified in a config file.
|
||||||
|
# Prefix the list here with "+" to use these queries and those in the config file.
|
||||||
|
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
||||||
|
|
||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below).
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v3
|
uses: github/codeql-action/autobuild@v3
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
# 📚 https://git.io/JvXDl
|
||||||
|
|
||||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||||
# three lines and modify them (or add more) to build your code if your
|
# and modify them (or add more) to build your code if your project
|
||||||
# project uses a compiled language
|
# uses a compiled language
|
||||||
|
|
||||||
# - run: |
|
#- run: |
|
||||||
# make bootstrap
|
# make bootstrap
|
||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v3
|
||||||
35
.github/workflows/go-build-test.yml
vendored
35
.github/workflows/go-build-test.yml
vendored
@ -40,24 +40,25 @@ jobs:
|
|||||||
uses: hoverkraft-tech/compose-action@v2.0.1
|
uses: hoverkraft-tech/compose-action@v2.0.1
|
||||||
# Uncomment and set the correct path to your docker-compose file
|
# Uncomment and set the correct path to your docker-compose file
|
||||||
with:
|
with:
|
||||||
compose-file: "./docker-compose.yml"
|
compose-file: "./docker/docker-compose.yml"
|
||||||
|
|
||||||
# run: |
|
# run: |
|
||||||
# sudo docker compose up -d
|
# sudo docker compose up -d
|
||||||
# sudo sleep 30 # Increased sleep time for better stability
|
# sudo sleep 30 # Increased sleep time for better stability
|
||||||
# timeout-minutes: 60 # Increased timeout for Docker setup
|
# timeout-minutes: 60 # Increased timeout for Docker setup
|
||||||
|
|
||||||
# - name: Get Internal IP Address
|
|
||||||
# id: get-ip
|
|
||||||
# run: |
|
|
||||||
# IP=$(hostname -I | awk '{print $1}')
|
|
||||||
# echo "The IP Address is: $IP"
|
|
||||||
# echo "::set-output name=ip::$IP"
|
|
||||||
|
|
||||||
# - name: Update .env
|
# - name: Get Internal IP Address
|
||||||
# run: |
|
# id: get-ip
|
||||||
# sed -i 's|externalAddress:.*|externalAddress: "http://${{ steps.get-ip.outputs.ip }}:10005"|' config/minio.yml
|
# run: |
|
||||||
# cat config/minio.yml
|
# IP=$(hostname -I | awk '{print $1}')
|
||||||
|
# echo "The IP Address is: $IP"
|
||||||
|
# echo "::set-output name=ip::$IP"
|
||||||
|
|
||||||
|
# - name: Update .env
|
||||||
|
# run: |
|
||||||
|
# sed -i 's|externalAddress:.*|externalAddress: "http://${{ steps.get-ip.outputs.ip }}:10005"|' config/minio.yml
|
||||||
|
# cat config/minio.yml
|
||||||
|
|
||||||
- name: Build and test Server Services
|
- name: Build and test Server Services
|
||||||
run: |
|
run: |
|
||||||
@ -71,15 +72,19 @@ jobs:
|
|||||||
repository: "openimsdk/chat"
|
repository: "openimsdk/chat"
|
||||||
path: "chat-repo"
|
path: "chat-repo"
|
||||||
|
|
||||||
- name: Build and test Chat Services
|
- name: Get Chat dependencies
|
||||||
run: |
|
run: |
|
||||||
cd ${{ github.workspace }}/chat-repo
|
cd ${{ github.workspace }}/chat-repo
|
||||||
go mod tidy
|
go mod tidy
|
||||||
go mod download
|
go mod download
|
||||||
go install github.com/magefile/mage@latest
|
go install github.com/magefile/mage@latest
|
||||||
sudo mage build
|
|
||||||
sudo mage start
|
- name: Build and test Chat Services
|
||||||
sudo mage check
|
run: |
|
||||||
|
cd ${{ github.workspace }}/chat-repo
|
||||||
|
mage build
|
||||||
|
mage start
|
||||||
|
mage check
|
||||||
|
|
||||||
dockerfile-test:
|
dockerfile-test:
|
||||||
name: Build and Test Dockerfile
|
name: Build and Test Dockerfile
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user