Skip to content

Commit 0b3d7c8

Browse files
authored
feat: bump toolset and unity-changeset (#67)
* feat: bump toolset and unity-changeset * chore: fix workflows for latest yarn * chore: downgrade to node functions lts * chore: workspaces * chore: bump w9jds/firebase-action * chore: bump predeploy * chore: sending good vibes * chore: fix node version * chore: no force was used to add this word
1 parent 9fd589e commit 0b3d7c8

File tree

9 files changed

+11042
-9476
lines changed

9 files changed

+11042
-9476
lines changed

.github/workflows/main.yml

Lines changed: 73 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -9,64 +9,90 @@ jobs:
99
name: 🧪 Test
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v4
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Install package manager (from package.json)
16+
run: |
17+
corepack enable
18+
corepack install
19+
20+
- name: Setup Node
21+
uses: actions/setup-node@v4
1422
with:
15-
node-version: 20
23+
node-version-file: package.json
1624
cache: 'yarn'
17-
- name: install dependencies
18-
run: yarn && yarn --cwd ./functions
25+
26+
- name: Install deps
27+
run: yarn install --immutable
28+
1929
- name: run linter
20-
run: yarn lint && yarn --cwd ./functions lint
30+
run: yarn lint && yarn workspace functions lint
31+
2132
- name: run tests
22-
run: yarn test && yarn --cwd ./functions test
23-
# - name: Upload test results
24-
# uses: actions/upload-artifact@v1
25-
# with:
26-
# name: Test results
27-
# path: "**/artifacs"
33+
run: yarn test && yarn workspace functions test
2834

2935
build:
3036
name: 🛠 Build
3137
runs-on: ubuntu-latest
3238
steps:
33-
- uses: actions/checkout@v4
34-
- uses: actions/setup-node@v4
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
42+
- name: Install package manager (from package.json)
43+
run: |
44+
corepack enable
45+
corepack install
46+
47+
- name: Setup Node
48+
uses: actions/setup-node@v4
3549
with:
36-
node-version: 20
50+
node-version-file: package.json
3751
cache: 'yarn'
38-
- name: install dependencies
39-
run: yarn && yarn --cwd ./functions
52+
53+
- name: Install deps
54+
run: yarn install --immutable
55+
4056
- name: build
41-
run: yarn --cwd ./functions build
57+
run: yarn workspace functions build
4258

4359
testDeploy:
4460
name: Test Deploy
4561
needs: [test, build]
4662
runs-on: ubuntu-latest
4763
steps:
48-
- uses: actions/checkout@v4
49-
- uses: actions/setup-node@v4
64+
- name: Checkout
65+
uses: actions/checkout@v4
66+
67+
- name: Install package manager (from package.json)
68+
run: |
69+
corepack enable
70+
corepack install
71+
72+
- name: Setup Node
73+
uses: actions/setup-node@v4
5074
with:
51-
node-version: 20
75+
node-version-file: package.json
5276
cache: 'yarn'
53-
- name: install dependencies
54-
run: yarn && yarn --cwd ./functions
77+
78+
- name: Install deps
79+
run: yarn install
80+
5581
- name: Deploy test to Firebase
56-
uses: w9jds/firebase-action@v13.25.0
82+
uses: w9jds/firebase-action@v14.19.0
5783
with:
58-
args: deploy --only functions:testFunction
84+
args: help ; corepack enable ; corepack install ; firebase deploy --only functions:testFunction --force
5985
env:
6086
GCP_SA_KEY: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_UNITY_CI_VERSIONS }}'
6187

6288
- name: Call Test Function
6389
run: curl -f -s -S -X POST https://testfunction-wbe4ukn6tq-ey.a.run.app
6490

6591
- name: Cleanup Firebase Test
66-
uses: w9jds/firebase-action@v13.25.0
92+
uses: w9jds/firebase-action@v14.19.0
6793
if: always()
6894
with:
69-
args: functions:delete testFunction --force
95+
args: help ; corepack enable ; corepack install ; firebase functions:delete testFunction --force
7096
env:
7197
GCP_SA_KEY: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_UNITY_CI_VERSIONS }}'
7298

@@ -76,23 +102,34 @@ jobs:
76102
runs-on: ubuntu-latest
77103
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
78104
steps:
79-
- uses: actions/checkout@v4
80-
- uses: actions/setup-node@v4
105+
- name: Checkout
106+
uses: actions/checkout@v4
107+
108+
- name: Install package manager (from package.json)
109+
run: |
110+
corepack enable
111+
corepack install
112+
113+
- name: Setup Node
114+
uses: actions/setup-node@v4
81115
with:
82-
node-version: 20
116+
node-version-file: package.json
83117
cache: 'yarn'
84-
- name: install dependencies
85-
run: yarn && yarn --cwd ./functions
118+
119+
- name: Install deps
120+
run: yarn install --immutable
121+
86122
- name: Deploy to Firebase
87-
uses: w9jds/firebase-action@v13.25.0
123+
uses: w9jds/firebase-action@v14.19.0
88124
with:
89-
args: deploy
125+
args: help ; corepack enable ; corepack install ; firebase deploy
90126
env:
91127
GCP_SA_KEY: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_UNITY_CI_VERSIONS }}'
128+
92129
- name: Cleanup Firebase Test
93-
uses: w9jds/firebase-action@v13.25.0
130+
uses: w9jds/firebase-action@v14.19.0
94131
if: always()
95132
with:
96-
args: functions:delete testFunction --force
133+
args: help ; corepack enable ; corepack install ; firebase functions:delete testFunction --force
97134
env:
98135
GCP_SA_KEY: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_UNITY_CI_VERSIONS }}'

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,7 @@ node_modules/
6969
.idea
7070
.vs
7171
.vscode
72+
73+
# Yarn
7274
functions/.yarn/
75+
.yarn/

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,14 @@ The Ingeminator ("repeater") handles the reliability of the build system:
6060
## Database Backup
6161

6262
Back up the Firestore database:
63+
6364
```bash
6465
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/serviceAccountKey.json"
6566
yarn run backfire export ./export/versioningBackendBackup --project unity-ci-versions --keyFile $GOOGLE_APPLICATION_CREDENTIALS
6667
```
6768

6869
Restore a backup:
70+
6971
```bash
7072
yarn run backfire import ./export/versioningBackendBackup --project unity-ci-versions --keyFile $GOOGLE_APPLICATION_CREDENTIALS
7173
```

firebase.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,16 @@
44
"indexes": "firestore.indexes.json"
55
},
66
"functions": {
7+
"runtime": "nodejs22",
78
"predeploy": [
8-
"yarn --cwd \"$RESOURCE_DIR\" lint",
9-
"yarn --cwd \"$RESOURCE_DIR\" test",
10-
"yarn --cwd \"$RESOURCE_DIR\" build"
9+
"yarn workspace functions lint",
10+
"yarn workspace functions test",
11+
"yarn workspace functions build"
1112
]
1213
},
1314
"hosting": {
1415
"public": "public",
15-
"ignore": [
16-
"firebase.json",
17-
"**/.*",
18-
"**/node_modules/**"
19-
]
16+
"ignore": ["firebase.json", "**/.*", "**/node_modules/**"]
2017
},
2118
"storage": {
2219
"rules": "storage.rules"

functions/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"test": "echo \"No tests yet, feel free to add\" && exit 0"
1313
},
1414
"engines": {
15-
"node": "20"
15+
"node": "22"
1616
},
1717
"main": "lib/index.js",
1818
"dependencies": {
@@ -21,11 +21,10 @@
2121
"eris": "^0.17.2",
2222
"firebase-admin": "^12.7.0",
2323
"firebase-functions": "^6.1.0",
24-
"graphql": "^16.9.0",
2524
"lodash": "^4.17.21",
2625
"node-fetch": "^2.7.0",
2726
"semver": "^7.6.3",
28-
"unity-changeset": "^2.5.0"
27+
"unity-changeset": "^3.0.1"
2928
},
3029
"devDependencies": {
3130
"@octokit/types": "^13.5.0",
@@ -44,7 +43,8 @@
4443
},
4544
"private": true,
4645
"volta": {
47-
"node": "20.14.0",
48-
"yarn": "1.22.22"
49-
}
46+
"node": "22.20.0",
47+
"yarn": "4.10.3"
48+
},
49+
"packageManager": "[email protected]"
5050
}

0 commit comments

Comments
 (0)