Skip to content

Commit

Permalink
makefile cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Dec 16, 2024
1 parent d241fb3 commit 138703d
Show file tree
Hide file tree
Showing 17 changed files with 261 additions and 424 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Update docs
name: update docs

on:
push:
branches:
- main
paths:
- ".github/workflows/docs.yaml"
- "README.md"
- "docs/**"
- .github/workflows/docs.yaml
- README.md
- docs/**

jobs:
update-docs:
Expand All @@ -22,7 +22,7 @@ jobs:
repository: VictoriaMetrics/victorialogs-datasource
ref: main
token: ${{ secrets.VM_BOT_GH_TOKEN }}
path: "__vm-datasource-repo"
path: "__vl-datasource-repo"

- name: Check out VM code
uses: actions/checkout@v4
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
sed -i 's|docs/assets/||g' ../__vm-docs-repo/docs/VictoriaLogs/victorialogs-datasource.md
cp docs/assets/* ../__vm-docs-repo/docs/VictoriaLogs/
working-directory: "__vm-datasource-repo"
working-directory: "__vl-datasource-repo"

- name: Commit and push changes
run: |
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
name: main
name: check / backend
on:
push:
branches:
- main
paths-ignore:
- "src/**"
- "**.md"
paths:
- .github/workflows/pr-checks-backend.yml
- go.*
- vendor/**
- pkg/**
pull_request:
branches:
- main
paths-ignore:
- "src/**"
- "**.md"
paths:
- .github/workflows/pr-checks-backend.yml
- go.*
- vendor/**
- pkg/**

permissions:
contents: read

Expand All @@ -25,10 +30,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v3
uses: actions/setup-go@v5
with:
go-version: 1.21.6
check-latest: true
Expand All @@ -48,40 +53,32 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: run tests
run: |
make ${{ matrix.scenario}}
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/checkout@v4

- uses: actions/cache@v3
- uses: actions/cache@v4
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
make vl-backend-plugin-build
42 changes: 42 additions & 0 deletions .github/workflows/pr-checks-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: check / frontend

on:
push:
branches: [main]
paths:
- '.github/workflow/pr-checks-frontend.yml'
- '**/*.ts'
- '**/*.tsx'
- '**/yarn.lock'
- '**/package.json'
pull_request:
branches: [main]
paths:
- '.github/workflow/pr-checks-frontend.yml'
- '**/*.ts'
- '**/*.tsx'
- '**/yarn.lock'
- '**/package.json'

jobs:
run-check:
name: check
runs-on: ubuntu-latest
strategy:
matrix:
scenario: ["make vl-frontend-plugin-build", "yarn test"]
steps:
- name: Code checkout
uses: actions/checkout@v4

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

- name: Install all dependencies
run: yarn install

- name: Run
run: |
${{ matrix.scenario }}
67 changes: 0 additions & 67 deletions .github/workflows/pr-checks-typescript.yml

This file was deleted.

90 changes: 0 additions & 90 deletions .github/workflows/pr-codeql-analize-golang.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/pr-codeql-backend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: codeql / backend

on:
push:
branches: [main]
paths:
- .github/workflows/pr-checks-backend.yml
- go.*
- vendor/**
- pkg/**
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
paths:
- .github/workflows/pr-checks-backend.yml
- go.*
- vendor/**
- pkg/**

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

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

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

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: go

- name: Autobuild
uses: github/codeql-action/autobuild@v3

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

0 comments on commit 138703d

Please sign in to comment.