#147 Refactoring: prepare BucketFS speedup #459
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 # UDFs fail with "VM error: Internal error: VM crashed" on ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-build | |
cancel-in-progress: true | |
env: | |
EXASOL_VERSION: 7.1.23 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20" | |
id: go | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: 11 | |
cache: "maven" | |
- name: Cache go modules | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
${{ runner.os }}-go- | |
- name: Get npm cache directory | |
id: npm-cache-dir | |
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | |
- name: Cache npm modules | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.npm-cache-dir.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Enable testcontainer reuse | |
run: echo 'testcontainers.reuse.enable=true' > "$HOME/.testcontainers.properties" | |
- name: Install dependencies | |
run: | | |
go get -t ./... | |
echo Revert go.sum modification by previous "go get" | |
go mod tidy | |
- name: Check generated code | |
run: | | |
go generate ./... | |
if [[ `git status --porcelain` ]]; then | |
echo "Project files did change:\n" | |
git --no-pager diff | |
exit 1 | |
else | |
echo "Generated code is up-to-date" | |
fi | |
- name: Build | |
run: | | |
go build ./... | |
go build -o extension-manager cmd/main.go | |
- name: Unit tests | |
run: | | |
go test -v -p 1 -count 1 -short ./... | |
- name: Integration tests | |
run: | | |
# -p 1 tells go not to run the tests in parallel. See the developer guide. | |
go test -v -p 1 -count 1 -coverprofile=coverage.out ./... | |
- name: Prepare testing extension | |
run: cd ./extension-manager-integration-test-java/testing-extension && npm ci | |
- name: Build and test integration test framework | |
run: mvn --batch-mode clean verify -Dcom.exasol.dockerdb.image=$EXASOL_VERSION -DtrimStackTrace=false | |
env: | |
EXASOL_VERSION: ${{ env.EXASOL_VERSION }} | |
- name: Build and test registry infrastructure | |
run: | | |
cd registry | |
echo "export const CONFIG = { owner: '[email protected]' }" > lib/config.ts | |
npm ci | |
npm run test | |
- name: Build and test registry upload | |
run: | | |
cd registry-upload | |
npm ci | |
npm run build | |
npm run lint | |
- name: Prepare SonarCloud scan | |
# Without this step, Sonar will fail with this error: | |
# "Maven project detected. You should run the goal 'org.sonarsource.scanner.maven:sonar' during build rather than using this GitHub Action." | |
run: rm ./pom.xml | |
- name: SonarCloud Scan | |
uses: SonarSource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Upload executable | |
uses: actions/upload-artifact@v3 | |
with: | |
name: extension-manager binary | |
path: extension-manager | |
if-no-files-found: error | |
retention-days: 5 | |
trace-requirements: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-trace-requirements | |
cancel-in-progress: true | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Cache OpenFastTrace | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: oft-${{ hashFiles('ci/trace-requirements.sh') }} | |
restore-keys: | | |
oft-${{ hashFiles('ci/trace-requirements.sh') }} | |
oft | |
- name: Run OpenFastTrace | |
run: ./ci/trace-requirements.sh | |
static-code-analysis-go: | |
runs-on: ubuntu-latest | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-static-code-analysis-go | |
cancel-in-progress: true | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Run golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.53.3 | |
args: --timeout=15m |