Skip to content

Commit

Permalink
Modernize CI workflow file
Browse files Browse the repository at this point in the history
Co-authored-by: surilindur <[email protected]>
  • Loading branch information
surilindur and surilindur authored Sep 19, 2023
1 parent 237e841 commit 3d74225
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 28 deletions.
6 changes: 0 additions & 6 deletions .github/posttypedoc.sh

This file was deleted.

11 changes: 0 additions & 11 deletions .github/pretypedoc.sh

This file was deleted.

20 changes: 20 additions & 0 deletions .github/typedoc-json.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

typedocjson='{
"extends": [
"../../typedoc.base.json"
],
"entryPoints": [
"lib/index.ts"
]
}'

for package in packages/* engines/*; do
tdpath="$package/typedoc.json"
indexpath="$package/lib/index.ts"
if [[ "$1" = "create" && -f "$indexpath" ]]; then
echo "$typedocjson" > "$tdpath"
elif [[ "$1" = "remove" && -f "$tdpath" ]]; then
rm "$tdpath"
fi
done
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
- name: Load cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
**/node_modules
key: ${{ runner.os }}-test-modules-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --pure-lockfile
run: yarn install --frozen-lockfile
- name: Build project
run: yarn run build
- name: Run tests
Expand Down Expand Up @@ -61,12 +61,12 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
- name: Load cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-lint-modules-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --pure-lockfile
run: yarn install --frozen-lockfile
- name: Run linter
run: yarn run lint

Expand All @@ -83,12 +83,12 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
- name: Load cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-docker-modules-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --pure-lockfile
run: yarn install --frozen-lockfile
- name: Install Lerna Docker
run: sh -c "`curl -fsSl https://raw.githubusercontent.com/rubensworks/lerna-docker/master/install.sh`"
- name: Build Docker images
Expand All @@ -110,12 +110,12 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
- name: Load cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-docs-modules-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --pure-lockfile
run: yarn install --frozen-lockfile
- name: Build docs
run: yarn run doc
- name: Deploy TSDoc to GitHub Pages
Expand All @@ -139,12 +139,12 @@ jobs:
- name: Check out repository
uses: actions/checkout@v3
- name: Load cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-webclients-modules-v1-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --pure-lockfile
run: yarn install --frozen-lockfile
- name: Build web clients
run: ./web-clients/build-web-clients.sh
- name: Deploy web clients
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"publish-release": "lerna publish",
"publish-bare": "lerna exec -- npm publish --silent",
"publish-canary": "yarn run build && lerna version prerelease --preid alpha.$(.github/get-next-alpha-version.sh) --exact --ignore-scripts --force-publish --no-push --no-git-tag-version --yes && git update-index --assume-unchanged $(git ls-files | tr '\\n' ' ') && lerna publish from-package --no-git-reset --pre-dist-tag next --force-publish --no-push --no-git-tag-version --yes && git update-index --no-assume-unchanged $(git ls-files | tr '\\n' ' ') && git checkout .",
"doc": "./.github/pretypedoc.sh && typedoc && ./.github/posttypedoc.sh",
"doc": "./.github/typedoc-json.sh create && typedoc && ./.github/typedoc-json.sh remove",
"postinstall": "yarn run build && lerna run prepare",
"version": "manual-git-changelog onversion"
},
Expand Down

0 comments on commit 3d74225

Please sign in to comment.