Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Handle errors from regexp (#200) #436

Handle errors from regexp (#200)

Handle errors from regexp (#200) #436

Workflow file for this run

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java/Js CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-java:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn -B verify -f java
build-native:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Graalvm
# 4.0
uses: DeLaGuardo/setup-graalvm@a766aa7b5fcc0a801fa3d4fd521ca299c03c9c00
with:
graalvm: '21.0.0.2'
java: java11
- name: Install native-image
run: |
gu install native-image
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn -B verify -Pnative -f java
build-js:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install dependencies
run: npm install
working-directory: js
- name: Build
run: npm run test
working-directory: js
build-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Go environment
uses: actions/setup-go@v2.1.4
with:
go-version: 1.19
- name: Set envs
run: |
go env -w GOPATH=$GITHUB_WORKSPACE
go env -w GO111MODULE=auto
cd go
make init
go mod tidy -compat=1.17
go test ./...
- name: Run Gosec Security Scanner
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go install github.com/securego/gosec/v2/cmd/gosec@v2.14.0
./run_gosec.sh
if [[ $? != 0 ]]
then
echo "gosec scanner failed to run "
exit 1
fi
- name: Upload SARIF file
uses: github/codeql-action/upload-sarif@v2
with:
# Path to SARIF file relative to the root of the repository
sarif_file: gosec.sarif