Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Init backend part of the plugin #1

Merged
merged 21 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 0 additions & 90 deletions .github/workflows/ci.yml

This file was deleted.

19 changes: 0 additions & 19 deletions .github/workflows/is-compatible.yml

This file was deleted.

87 changes: 87 additions & 0 deletions .github/workflows/pr-checks-golang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: main
on:
push:
branches:
- main
paths-ignore:
- "src/**"
- "**.md"
pull_request:
branches:
- main
paths-ignore:
- "src/**"
- "**.md"
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.21.6
check-latest: true
cache: true

- name: Dependencies
run: |
make check-all
git diff --exit-code

test:
needs: lint
strategy:
matrix:
scenario: ["golang-test", "golang-test-race"]
name: test
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v3

- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.21.6
check-latest: true
cache: true

- name: run tests
run: |
make ${{ matrix.scenario}}

build:
needs: test
name: build
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v3

- name: Setup Go
id: go
uses: actions/setup-go@v3
with:
go-version: 1.21.6
check-latest: true
cache: true

- uses: actions/cache@v3
with:
path: gocache-for-docker
key: gocache-docker-${{ runner.os }}-${{ steps.go.outputs.go-version }}-${{ hashFiles('go.mod') }}

- name: Build
run: |
make victorialogs-backend-plugin-build
67 changes: 67 additions & 0 deletions .github/workflows/pr-checks-typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Name of this action
name: check frontend

# Event triggers on pull request event
# For more detail visit https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on
on:
push:
branches: [ main ]
paths:
- '**/*.ts'
- '**/*.tsx'
pull_request:
branches: [main]
paths:
- '**/*.ts'
- '**/*.tsx'

# The jobs this action will run. You can write as many jobs as you want.
# For more detail on this section visit https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobs
jobs:
# ID of the job
run-jest-tests:
# Name of the job as it will be displayed in GitHub
name: Jest Tests
# Machine which this action will be run on. For a list of all the machines available/how to run on self hosted machine visit
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
runs-on: ubuntu-latest

# Steps this job must take to complete
steps:
# Reference the main branch. For more information visit https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsuses
- name: Checkout under $GITHUB_WORKSPACE
uses: actions/checkout@main

# Specify which version of Node this project is using. For more information visit.
# https://docs.github.com/en/actions/guides/building-and-testing-nodejs#specifying-the-nodejs-version
- name: Set up node
uses: actions/setup-node@v1
with:
node-version: 20.9.0

- name: Install all dependencies
run: yarn install

- name: Run Jest Tests
run: npm run test

run-build:
needs: run-jest-tests
name: build
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v3

- name: Set up node
uses: actions/setup-node@v1
with:
node-version: 20.9.0

- name: Install all dependencies
run: yarn install

- name: Build
shell: 'script -q -e -c "bash {0}"'
run: |
make victorialogs-frontend-plugin-build
90 changes: 90 additions & 0 deletions .github/workflows/pr-codeql-analize-golang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL for PR / golang"

on:
push:
branches: [main]
paths-ignore:
- "src/**"
- "**.md"
- "**.txt"
- "**.js"
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
paths-ignore:
- "src/**"
- "**.md"
- "**.txt"
- "**.js"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["go"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.6
check-latest: true
cache: true
if: ${{ matrix.language == 'go' }}

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# 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#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
39 changes: 39 additions & 0 deletions .github/workflows/pr-codeql-analysis-typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "CodeQL for PR / javascript"

on:
push:
branches: [ main ]
paths:
- '**/*.ts'
- '**/*.tsx'
- '!**/*.test.ts'
- '!**/*.test.tsx'
pull_request:
branches: [main]
paths:
- '**/*.ts'
- '**/*.tsx'
- '!**/*.test.ts'
- '!**/*.test.tsx'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: "javascript"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Loading
Loading