Skip to content

Commit

Permalink
ci: move caching before npm install, bump action versions
Browse files Browse the repository at this point in the history
  • Loading branch information
polito-mobile committed May 13, 2024
1 parent 2084264 commit ca35adc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ jobs:
echo "CONFIGURED:"
cat $GITHUB_OUTPUT
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Cache node modules
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -152,15 +156,15 @@ jobs:
run:
echo "MAPBOX_DOWNLOADS_TOKEN=${{ secrets.MAPBOX_TOKEN }}" >> android/local.properties
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
uses: gradle/actions/wrapper-validation@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: .nvmrc
- name: Cache node modules
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -249,26 +253,23 @@ jobs:
with:
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Set up Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
node-version-file: .nvmrc
- name: Cache node modules
uses: actions/cache@v4
with:
path: ./node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('./package-lock.json') }}
- name: Setup .npmrc
run: printf '@polito:registry=https://npm.pkg.github.com\n//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}\n' > .npmrc
- name: Install npm dependencies
run: npm install
- name: Cache pods
uses: actions/cache@v4
with:
path: ./ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
- name: Install pod dependencies
working-directory: ./ios
run: bundle exec pod install --repo-update
- name: Install npm dependencies
run: npm install
- name: Prepare fastlane
working-directory: ./ios
run: |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"format": "prettier --write '**/*.{ts,tsx,md}'",
"types:check": "tsc --noEmit",
"check": "npm run lint:check && npm run format:check && npm run types:check",
"postinstall": "react-native setup-ios-permissions"
"postinstall": "react-native setup-ios-permissions && pod-install"
},
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.2.1",
Expand Down

0 comments on commit ca35adc

Please sign in to comment.