Skip to content

Commit 91f425d

Browse files
makefile cleanup
1 parent 3bc9782 commit 91f425d

16 files changed

+260
-420
lines changed

.config/webpack/constants.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
export const SOURCE_DIR = 'src';
2-
export const DIST_DIR = 'plugins/victorialogs-datasource';
2+
export const DIST_DIR = 'plugins/frontend';

.github/workflows/docs.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: Update docs
1+
name: update docs
22

33
on:
44
push:
55
branches:
66
- main
77
paths:
8-
- ".github/workflows/docs.yaml"
9-
- "README.md"
10-
- "docs/**"
8+
- .github/workflows/docs.yaml
9+
- README.md
10+
- docs/**
1111

1212
jobs:
1313
update-docs:
@@ -22,7 +22,7 @@ jobs:
2222
repository: VictoriaMetrics/victorialogs-datasource
2323
ref: main
2424
token: ${{ secrets.VM_BOT_GH_TOKEN }}
25-
path: "__vm-datasource-repo"
25+
path: "__vl-datasource-repo"
2626

2727
- name: Check out VM code
2828
uses: actions/checkout@v4
@@ -63,7 +63,7 @@ jobs:
6363
sed -i 's|docs/assets/||g' ../__vm-docs-repo/docs/VictoriaLogs/victorialogs-datasource.md
6464
6565
cp docs/assets/* ../__vm-docs-repo/docs/VictoriaLogs/
66-
working-directory: "__vm-datasource-repo"
66+
working-directory: "__vl-datasource-repo"
6767

6868
- name: Commit and push changes
6969
run: |
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
name: main
1+
name: check / backend
22
on:
33
push:
44
branches:
55
- main
6-
paths-ignore:
7-
- "src/**"
8-
- "**.md"
6+
paths:
7+
- .github/workflows/pr-checks-backend.yml
8+
- go.*
9+
- vendor/**
10+
- pkg/**
911
pull_request:
1012
branches:
1113
- main
12-
paths-ignore:
13-
- "src/**"
14-
- "**.md"
14+
paths:
15+
- .github/workflows/pr-checks-backend.yml
16+
- go.*
17+
- vendor/**
18+
- pkg/**
19+
1520
permissions:
1621
contents: read
1722

@@ -25,10 +30,10 @@ jobs:
2530
runs-on: ubuntu-latest
2631
steps:
2732
- name: Code checkout
28-
uses: actions/checkout@v3
33+
uses: actions/checkout@v4
2934

3035
- name: Setup Go
31-
uses: actions/setup-go@v3
36+
uses: actions/setup-go@v5
3237
with:
3338
go-version: 1.21.6
3439
check-latest: true
@@ -48,40 +53,32 @@ jobs:
4853
runs-on: ubuntu-latest
4954
steps:
5055
- name: Code checkout
51-
uses: actions/checkout@v3
56+
uses: actions/checkout@v4
5257

5358
- name: Setup Go
54-
uses: actions/setup-go@v3
59+
uses: actions/setup-go@v5
5560
with:
5661
go-version: 1.21.6
5762
check-latest: true
5863
cache: true
5964

6065
- name: run tests
6166
run: |
62-
make ${{ matrix.scenario}}
67+
make ${{ matrix.scenario }}
6368
6469
build:
6570
needs: test
6671
name: build
6772
runs-on: ubuntu-latest
6873
steps:
6974
- name: Code checkout
70-
uses: actions/checkout@v3
71-
72-
- name: Setup Go
73-
id: go
74-
uses: actions/setup-go@v3
75-
with:
76-
go-version: 1.21.6
77-
check-latest: true
78-
cache: true
75+
uses: actions/checkout@v4
7976

80-
- uses: actions/cache@v3
77+
- uses: actions/cache@v4
8178
with:
8279
path: gocache-for-docker
8380
key: gocache-docker-${{ runner.os }}-${{ steps.go.outputs.go-version }}-${{ hashFiles('go.mod') }}
8481

8582
- name: Build
8683
run: |
87-
make victorialogs-backend-plugin-build
84+
make vl-backend-plugin-build
+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: check / frontend
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- '.github/workflow/pr-checks-frontend.yml'
8+
- '**/*.ts'
9+
- '**/*.tsx'
10+
- '**/yarn.lock'
11+
- '**/package.json'
12+
pull_request:
13+
branches: [main]
14+
paths:
15+
- '.github/workflow/pr-checks-frontend.yml'
16+
- '**/*.ts'
17+
- '**/*.tsx'
18+
- '**/yarn.lock'
19+
- '**/package.json'
20+
21+
jobs:
22+
run-check:
23+
name: check
24+
runs-on: ubuntu-latest
25+
strategy:
26+
matrix:
27+
scenario: ["make vl-frontend-plugin-build", "yarn test"]
28+
steps:
29+
- name: Code checkout
30+
uses: actions/checkout@v4
31+
32+
- name: Set up node
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: 20.9.0
36+
37+
- name: Install all dependencies
38+
run: yarn install
39+
40+
- name: Run
41+
run: |
42+
${{ matrix.scenario }}

.github/workflows/pr-checks-typescript.yml

-67
This file was deleted.

.github/workflows/pr-codeql-analize-golang.yml

-90
This file was deleted.
+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: codeql / backend
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- .github/workflows/pr-checks-backend.yml
8+
- go.*
9+
- vendor/**
10+
- pkg/**
11+
pull_request:
12+
# The branches below must be a subset of the branches above
13+
branches: [main]
14+
paths:
15+
- .github/workflows/pr-checks-backend.yml
16+
- go.*
17+
- vendor/**
18+
- pkg/**
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
22+
cancel-in-progress: true
23+
24+
jobs:
25+
analyze:
26+
name: Analyze
27+
runs-on: ubuntu-latest
28+
permissions:
29+
actions: read
30+
contents: read
31+
security-events: write
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@v4
36+
37+
- name: Set up Go
38+
uses: actions/setup-go@v5
39+
with:
40+
go-version: 1.21.6
41+
check-latest: true
42+
cache: true
43+
if: ${{ matrix.language == 'go' }}
44+
45+
- name: Initialize CodeQL
46+
uses: github/codeql-action/init@v3
47+
with:
48+
languages: go
49+
50+
- name: Autobuild
51+
uses: github/codeql-action/autobuild@v3
52+
53+
- name: Perform CodeQL Analysis
54+
uses: github/codeql-action/analyze@v3

0 commit comments

Comments
 (0)