Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/npm_and_yarn/plist-3.0.5
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjeff0 authored Aug 17, 2022
2 parents 4059c16 + c7c398a commit 1065b43
Show file tree
Hide file tree
Showing 200 changed files with 13,729 additions and 6,307 deletions.
4 changes: 4 additions & 0 deletions .carve/ignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ athens.common-events.graph.atomic/make-shortcut-move-op
athens.common-events.graph.schema/valid-atomic-op?
athens.common-events.graph.schema/explain-atomic-op
athens.style/unzoom
athens.self-hosted.fluree.test-helpers/query
athens.views.jetsam/jetsam-component
athens.types.tasks.view/new-task
athens.types.tasks.view/update-task-properties
5 changes: 5 additions & 0 deletions .clj-kondo/rewrite-clj/rewrite-clj/config.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{:lint-as
{rewrite-clj.zip/subedit-> clojure.core/->
rewrite-clj.zip/subedit->> clojure.core/->>
rewrite-clj.zip/edit-> clojure.core/->
rewrite-clj.zip/edit->> clojure.core/->>}}
2 changes: 1 addition & 1 deletion .github/custom-actions/clojure-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ runs:
- name: Prepare java
uses: actions/setup-java@v2
with:
java-version: '11'
java-version: '17'
distribution: 'temurin'

- uses: DeLaGuardo/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/custom-actions/node-env/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ runs:
id: restore-yarn
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
key: ${{ runner.os }}-v1-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
${{ runner.os }}-v1-yarn-
- name: Fetch yarn dependencies
run: yarn install --frozen-lockfile --network-timeout 10000000
Expand Down
62 changes: 36 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
# Keep version and script up to date!
- uses: DeLaGuardo/setup-clj-kondo@master
with:
version: '2021.08.06'
version: '2022.03.09'

- name: Lint
run: clj-kondo --lint src
Expand Down Expand Up @@ -63,6 +63,15 @@ jobs:
- name: Run Karma tests
run: yarn client:test

# TODO: these tests cause the test runner to never exist, so they
# can't be ran on CI. Please run them manually for now.
# See https://github.com/fluree/db/issues/163.
# - name: Start Fluree process
# run: yarn server:fluree

# - name: Run Fluree tests
# run: yarn server:test:fluree


e2e:
runs-on: ubuntu-latest
Expand All @@ -79,9 +88,9 @@ jobs:
id: restore-shadow-cljs-build-cache
with:
path: ./.shadow-cljs
key: ${{ runner.os }}-v1-shadow-cljs-build-cache-${{ hashFiles('yarn.lock') }}
key: ${{ runner.os }}-v2-shadow-cljs-build-cache-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-v1-shadow-cljs-build-cache
${{ runner.os }}-v2-shadow-cljs-build-cache
- name: Compile JS assets for dev
run: yarn client:dev-build
Expand All @@ -100,13 +109,10 @@ jobs:
- uses: ./.github/custom-actions/node-env

- name: Compile JS Assets for production
run: yarn prod --config-merge "{:closure-defines {athens.core/SENTRY_DSN \"${SENTRY_DSN}\" athens.util/COMMIT_URL \"${COMMIT_URL}\" athens.main.core/AUTO_UPDATE ${AUTO_UPDATE}}}"
run: yarn prod --config-merge "{:closure-defines {athens.core/SENTRY_DSN \"${SENTRY_DSN}\" athens.util/COMMIT_URL \"${COMMIT_URL}\"}}"
env:
SENTRY_DSN: ${{ secrets.sentry_dsn }}
COMMIT_URL: "https://github.com/${{github.repository}}/commit/${{github.sha}}"
# See athens.main.core/AUTO_UPDATE for more details.
# TODO: set to true when publishing auto-update information for 2.0.0-beta.
AUTO_UPDATE: false

- name: Run client e2e tests over the prod build
run: yarn client:e2e
Expand All @@ -133,12 +139,22 @@ jobs:
name: app
path: resources

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
- name: Copy built app to a vercel prod deploy folder
run: mkdir -p vercel-release/vercel-static/athens && cp -R resources/public/. vercel-release/vercel-static/athens/

- uses: amondnet/vercel-action@v20
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./resources/public
force_orphan: true
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
scope: athens-research
vercel-args: './vercel-release/'
# Poor mans ternary operator https://github.com/actions/runner/issues/409#issuecomment-727565588
alias-domains: ${{ env.PRERELEASE == 'true' && env.PRERELEASE_DOMAIN || env.RELEASE_DOMAIN }}
env:
PRERELEASE: ${{ contains(github.ref, '-alpha.') || contains(github.ref, '-beta.') || contains(github.ref, '-rc.')}}
PRERELEASE_DOMAIN: beta.athensresearch.org
RELEASE_DOMAIN: web.athensresearch.org


release-electron:
Expand All @@ -151,15 +167,7 @@ jobs:

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
electron-arch-overrides: [""]
# Separate out the arm64 macos build, those are the longest builds.
# package.json still includes configuration to build both targets.
include:
- os: macos-latest
electron-arch-overrides: "-c.mac.target.target=dmg -c.mac.target.arch=x64"
- os: macos-latest
electron-arch-overrides: "-c.mac.target.target=dmg -c.mac.target.arch=arm64"
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -197,10 +205,6 @@ jobs:
# release the app after building
release: ${{ startsWith(github.ref, 'refs/tags/v') }}

# TODO: remove publishAutoUpdate setting when we think enough 1.0.0-beta
# users have updated to 1.0.0, otherwise they will be auto-updated to 2.0.0-beta.
args: -c.publish.publishAutoUpdate=false ${{ matrix.electron-arch-overrides }}

env:
# macOS notarization API key
API_KEY_ID: ${{ secrets.api_key_id }}
Expand All @@ -209,13 +213,19 @@ jobs:

release-server:
runs-on: ubuntu-latest
needs: [test, lint, style, carve]
needs: [test, lint, style, carve, build-app]
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')

steps:
- uses: actions/checkout@v2
- uses: ./.github/custom-actions/clojure-env

- name: Download built app
uses: actions/download-artifact@v2
with:
name: app
path: resources

- name: Compile server code
run: yarn server:compile

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,5 @@ vercel-static/*
!vercel-static/index.html
!vercel-state/athens/.gitignore
.vercel
vercel-release/*
!vercel-release/package.json
Loading

0 comments on commit 1065b43

Please sign in to comment.