Merge pull request #994 from fluree/fix/expandex-commit #6391
This file contains hidden or 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 | |
on: | |
push: | |
schedule: | |
- cron: 13 01 * * * | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
jobs: | |
docker-hub-login: | |
name: login to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USER }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
logout: false | |
docker-build-cache: | |
name: docker build cache | |
needs: docker-hub-login | |
runs-on: ci-cd | |
steps: | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- uses: docker/build-push-action@v6 | |
id: build | |
with: | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: fluree/db | |
load: true | |
test-browser: | |
name: test flureedb.js | |
needs: docker-build-cache | |
runs-on: ci-cd | |
steps: | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- uses: docker/build-push-action@v6 | |
with: | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: fluree/db | |
load: true | |
- name: Run tests | |
run: docker run fluree/db make browser-test | |
test-cljs: | |
name: run cljs tests | |
needs: docker-build-cache | |
runs-on: ci-cd | |
steps: | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- uses: docker/build-push-action@v6 | |
with: | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: fluree/db | |
load: true | |
- name: Run tests | |
run: | | |
docker create --name fluree-db fluree/db true | |
docker cp fluree-db:/usr/src/flureedb/docker-chrome-seccomp.json . | |
docker rm fluree-db | |
docker run --security-opt seccomp=docker-chrome-seccomp.json fluree/db make cljstest | |
test-other: | |
name: run other tests | |
needs: docker-build-cache | |
runs-on: ci-cd | |
steps: | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- uses: docker/build-push-action@v6 | |
with: | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
tags: fluree/db | |
load: true | |
- name: Run tests | |
run: docker run fluree/db make cljtest eastwood nodejs-test | |
cljfmt-check: | |
name: cljfmt check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- uses: DeLaGuardo/[email protected] | |
with: | |
cli: 'latest' | |
cljfmt: 'latest' | |
- run: make cljfmt-check | |
clj-kondo-lint: | |
name: clj-kondo lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeLaGuardo/[email protected] | |
with: | |
cli: 'latest' | |
clj-kondo: 'latest' | |
- run: make clj-kondo-lint-ci | |
notifications: | |
name: send notifications | |
if: always() | |
needs: [test-browser, test-cljs, test-other] | |
runs-on: ubuntu-latest | |
steps: | |
- if: github.ref == 'refs/heads/main' && failure() | |
env: | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
uses: voxmedia/github-action-slack-notify-build@v2 | |
with: | |
channel: development | |
status: FAILED | |
color: danger |