Skip to content

Commit

Permalink
Merge pull request #758 from eisbuk/chore/repo-maintenance-1
Browse files Browse the repository at this point in the history
Chore/repo maintenance 1
  • Loading branch information
silviot authored Jun 6, 2023
2 parents 455ac7b + 012f1dd commit 8af221b
Show file tree
Hide file tree
Showing 265 changed files with 9,141 additions and 12,855 deletions.
72 changes: 1 addition & 71 deletions .github/version-check-status.json
Original file line number Diff line number Diff line change
@@ -1,73 +1,3 @@
{
"mismatchedVersions": [
{
"dependencyName": "firebase-admin",
"versions": [
{
"projects": ["@eisbuk/backup-restore"],
"version": "^11.0.1"
},
{
"projects": [
"@eisbuk/client",
"@eisbuk/e2e",
"@eisbuk/firestore-process-delivery",
"@eisbuk/functions"
],
"version": "^9.4.2"
}
]
},
{
"dependencyName": "@firebase/app",
"versions": [
{
"projects": [
"@eisbuk/client",
"@eisbuk/react-redux-firebase-firestore"
],
"version": "0.7.2"
},
{
"projects": ["@eisbuk/e2e"],
"version": "^0.7.20"
}
]
},
{
"dependencyName": "@firebase/firestore",
"versions": [
{
"projects": [
"@eisbuk/client",
"@eisbuk/react-redux-firebase-firestore"
],
"version": "3.1.0"
},
{
"projects": ["@eisbuk/e2e"],
"version": "^3.4.7"
}
]
},
{
"dependencyName": "firebase",
"versions": [
{
"projects": [
"@eisbuk/client",
"@eisbuk/react-redux-firebase-firestore"
],
"version": "9.1.1"
},
{
"projects": [
"@eisbuk/firestore-process-delivery",
"@eisbuk/functions"
],
"version": "^8.2.4"
}
]
}
]
"mismatchedVersions": []
}
72 changes: 37 additions & 35 deletions .github/workflow.templates/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! YAML library files must be named *.lib.yml
#@ load("setup.lib.yml", "checkout")
#@ load("cache.lib.yml", "cache_node", "cache_cypress")
#@ load("rush.lib.yml", "rush_add_path", "rush_update", "rush_build")
#@ load("secrets.lib.yml", "check_secrets")
Expand All @@ -13,15 +14,15 @@ name: OnPush
- push

jobs:
build_v16:
build_v18:
name: Build and deploy to preview channel
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- #@ checkout()
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- #@ cache_node()
- #@ rush_add_path()
- #@ rush_update()
Expand All @@ -30,8 +31,8 @@ jobs:
run: |
cd packages/client && NODE_OPTIONS="--max-old-space-size=8192" rushx build:prod | tee build.output
echo "BUILD_STATS<<EOF" >> $GITHUB_ENV
# Select all lines starting with 'dist/' from build.output (those are the lines reporting the build file sizes)
# And store for use in later steps
#! Select all lines starting with 'dist/' from build.output (those are the lines reporting the build file sizes)
#! And store for use in later steps
cat build.output|awk '/^dist\// {print}' >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
env:
Expand Down Expand Up @@ -64,39 +65,40 @@ jobs:
if: steps.has_secret.outputs.HAS_SECRETS
run: |
set -e
# Deploy the preview to firebase hosting, passing the current git branch to be used for the name
# of the preview channel
#! Deploy the preview to firebase hosting, passing the current git branch to be used for the name
#! of the preview channel
firebase --project eisbuk hosting:channel:deploy ${GITHUB_REF_SLUG_URL:-dev} --token ${{ secrets.FIREBASE_SERVICE_ACCOUNT_EISBUK }} | tee deploy.output
# To pass the info to a later task, use the $GITHUB_ENV file
# This horrible contraption converts lines like
# ✔ hosting:channel: Channel URL (igorice): https://igorice--dev-n0jjvnkh.web.app [expires 2022-03-29 13:10:04] [version a47ca837c7966792]
# ✔ hosting:channel: Channel URL (eisbuk): https://eisbuk--dev-xjkubzx5.web.app [expires 2022-03-29 13:10:04] [version 6638d82269ac0062]
# to a form like this:
# igorice=https://igorice--dev-n0jjvnkh.web.app
# eisbuk=https://eisbuk--dev-xjkubzx5.web.app
# suitable to be included in the $GITHUB_ENV file
#! To pass the info to a later task, use the $GITHUB_ENV file
#! This horrible contraption converts lines like
#! ✔ hosting:channel: Channel URL (igorice): https://igorice--dev-n0jjvnkh.web.app [expires 2022-03-29 13:10:04] [version a47ca837c7966792]
#! ✔ hosting:channel: Channel URL (eisbuk): https://eisbuk--dev-xjkubzx5.web.app [expires 2022-03-29 13:10:04] [version 6638d82269ac0062]
#! to a form like this:
#! igorice=https://igorice--dev-n0jjvnkh.web.app
#! eisbuk=https://eisbuk--dev-xjkubzx5.web.app
#! suitable to be included in the $GITHUB_ENV file
cat deploy.output | grep 'Channel URL' | grep 'hosting:channel:.*https://'|sed -e "s/\x1b\[[0-9;]*m//g;s|.*(||;s|)[^h]*|=|;s/.\[.*//" >> $GITHUB_ENV
# documented here: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
#! documented here: https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
- name: Populate job summary with URLs
run: |
echo Preview channels deployed: >> $GITHUB_STEP_SUMMARY
echo $igoriceteam >> $GITHUB_STEP_SUMMARY
echo $eisbuk >> $GITHUB_STEP_SUMMARY
test_v16:
test_v18:
name: Run tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- #@ checkout()
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- #@ cache_node()
- #@ rush_add_path()
- #@ rush_update()
- #@ rush_build()
- name: Run tests
run: cd packages/client && rushx test:emulators:ci

- #@ check_secrets()
- name: Test Report
uses: dorny/test-reporter@v1
Expand All @@ -105,9 +107,9 @@ jobs:
if: steps.has_secret.outputs.HAS_SECRETS && (success() || failure())

with:
name: JEST Tests
name: Vitest report
path: packages/client/junit.xml
reporter: jest-junit
reporter: java-junit
- name: Coveralls
uses: coverallsapp/github-action@master
if: steps.has_secret.outputs.HAS_SECRETS
Expand All @@ -128,15 +130,16 @@ jobs:
if: (success() || failure()) && steps.has_secret.outputs.HAS_SECRETS
run: |
echo Check out coverage results at https://storage.googleapis.com/cypress-logs-bucket/${{ steps.results-destination.outputs.RESULTS_DESTINATION }}/coverage/lcov-report/index.html
run-lint:
name: Lint source
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- #@ checkout()
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- #@ cache_node()
- #@ rush_add_path()
- #@ rush_update()
Expand All @@ -149,11 +152,10 @@ jobs:
name: Cypress browser tests
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
- #@ checkout()
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- #@ cache_cypress()
- #@ rush_add_path()
- #@ rush_update()
Expand All @@ -171,7 +173,7 @@ jobs:
install: false

working-directory: packages/e2e
wait-on: http://localhost:8080, http://localhost:5000
wait-on: http://127.0.0.1:8080, http://127.0.0.1:5000

#! skip recording if no 'secrets.CYPRESS_KEY' found
#! we're doing this to allow dependabot to run cypress tests without failing on account of CYPRESS_KEY
Expand Down Expand Up @@ -215,7 +217,7 @@ jobs:
name: Coveralls finish
needs:
- cypress-run
- test_v16
- test_v18
runs-on: ubuntu-latest
steps:
- #@ check_secrets()
Expand All @@ -231,10 +233,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- #@ checkout()
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- #@ cache_node()
- #@ rush_add_path()
- #@ rush_update()
Expand Down
4 changes: 2 additions & 2 deletions .github/workflow.templates/cache.lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ with:
common/temp
**/node_modules
~/.cache/firebase/emulators
key: ${{ runner.os }}-modules-emulators-node16-v2-${{ hashFiles('**/pnpm-lock.yaml') }}
key: ${{ runner.os }}-modules-emulators-node18-v1-${{ hashFiles('**/pnpm-lock.yaml') }}
#@ end

#@ def cache_cypress():
Expand All @@ -22,5 +22,5 @@ with:
**/node_modules
~/.cache/firebase/emulators
~/.cache/Cypress
key: ${{ runner.os }}-modules-emulators-cypress-node16-v2-${{ hashFiles('**/pnpm-lock.yaml', '**/package.json', 'common/config/rush/repo-state.json') }}
key: ${{ runner.os }}-modules-emulators-cypress-node18-v1-${{ hashFiles('**/pnpm-lock.yaml', '**/package.json', 'common/config/rush/repo-state.json') }}
#@ end
8 changes: 4 additions & 4 deletions .github/workflow.templates/cypress-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! YAML library files must be named *.lib.yml
#@ load("setup.lib.yml", "checkout")
#@ load("cache.lib.yml", "cache_node", "cache_cypress")
#@ load("rush.lib.yml", "rush_add_path", "rush_update", "rush_build")
#@ load("secrets.lib.yml", "check_secrets")
Expand Down Expand Up @@ -29,11 +30,10 @@ jobs:
dummy1: [1, 2, 3, 4, 5, 6]
dummy2: [1, 2, 3, 4, 5, 6]
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-node@v2
- #@ checkout()
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- #@ cache_cypress()
- #@ rush_add_path()
- #@ rush_update()
Expand Down
7 changes: 4 additions & 3 deletions .github/workflow.templates/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! YAML library files must be named *.lib.yml
#@ load("setup.lib.yml", "checkout")
#@ load("cache.lib.yml", "cache_node", "cache_cypress")
#@ load("rush.lib.yml", "rush_add_path", "rush_update", "rush_build")

Expand All @@ -17,10 +18,10 @@ jobs:
steps:
- name: Install expect
run: sudo apt-get -y install expect
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- #@ checkout()
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: "18"
- #@ cache_node()
- #@ rush_add_path()
- #@ rush_update()
Expand Down
6 changes: 6 additions & 0 deletions .github/workflow.templates/setup.lib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#@ def checkout(fetchdepth=1):
uses: actions/checkout@v2
with:
submodules: "recursive"
fetch-depth: #@ fetchdepth
#@ end
9 changes: 4 additions & 5 deletions .github/workflow.templates/storybook.lib.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#@ load("setup.lib.yml", "checkout")
#@ load("cache.lib.yml", "cache_node", "cache_cypress")
#@ load("rush.lib.yml", "rush_add_path", "rush_update", "rush_build")
#@ load("secrets.lib.yml", "check_secrets")
Expand All @@ -10,12 +11,10 @@ name: #@ "Build storybook for %s" % (package_name)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- #@ checkout(0)
- uses: actions/setup-node@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: "16"
node-version: "18"
- #@ cache_node()
- #@ rush_add_path()
- #@ rush_update()
Expand Down
9 changes: 4 additions & 5 deletions .github/workflow.templates/storybook.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! YAML library files must be named *.lib.yml
#@ load("setup.lib.yml", "checkout")
#@ load("cache.lib.yml", "cache_node", "cache_cypress")
#@ load("rush.lib.yml", "rush_add_path", "rush_update", "rush_build")
#@ load("secrets.lib.yml", "check_secrets")
Expand All @@ -14,12 +15,10 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- #@ checkout(0)
- uses: actions/setup-node@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: "16"
node-version: "18"
- #@ cache_node()
- #@ rush_add_path()
- #@ rush_update()
Expand Down
Loading

0 comments on commit 8af221b

Please sign in to comment.