Skip to content

Commit

Permalink
updated ci jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewChubatiuk committed Dec 1, 2024
1 parent e750946 commit 01db820
Show file tree
Hide file tree
Showing 10 changed files with 137 additions and 187 deletions.
8 changes: 4 additions & 4 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 Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
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"
- .github/workflows/pr-checks-backend.yml
- go.*
- vendor/**
- pkg/**

permissions:
contents: read

Expand Down
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 vm-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: 18.13.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
Original file line number Diff line number Diff line change
@@ -1,20 +1,26 @@
name: "CodeQL for PR / javascript"
name: codeql / frontend

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

jobs:
analyze:
Expand All @@ -23,17 +29,14 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
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
uses: github/codeql-action/init@v3
with:
languages: "javascript"

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
14 changes: 5 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
name: Release
name: release
on:
release:
types:
- created
push:
tags:
- 'v*'
env:
PKG_TAG: ${{ github.event.release.tag_name }}
jobs:
release:
name: Release on GitHub
runs-on: ubuntu-24.04
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
pages: write
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Setup golang
uses: actions/setup-go@v5
with:
go-version: ~1.23
- name: Setup golang caches
uses: actions/cache@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ packages/lezer-metricsql/src/parser.terms.js
# Editor
.idea
.vscode

.npm
.eslintcache

# Cypress
Expand Down
Loading

0 comments on commit 01db820

Please sign in to comment.