chore: use setup-node@v4 with node v20 on GH Actions #63
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint-ios | |
on: | |
pull_request: | |
branches: [main] | |
paths: | |
- "packages/mobile/ios/**" | |
- "packages/fabricMobile/ios/**" | |
- "packages/react-native-avoid-softinput/ios/**" | |
- ".github/workflows/lint-ios.yml" | |
jobs: | |
lint-ios: | |
name: Lint Swift & ObjC | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: "**/node_modules" | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Install modules | |
uses: actions/setup-node@v4 | |
with: | |
cache: "yarn" | |
registry-url: "https://registry.npmjs.org" | |
cache-dependency-path: "**/yarn.lock" | |
- run: yarn | |
- name: SwiftLint | |
run: | | |
#!/bin/bash | |
if ! command -v swiftlint &> /dev/null | |
then | |
echo "SwiftLint is not installed. Installing" | |
brew install swiftlint | |
fi | |
yarn lint:ios:swift | |
yarn lint:fabric:ios:swift | |
- name: ClangFormat | |
run: | | |
#!/bin/bash | |
if ! command -v clang-format &> /dev/null | |
then | |
echo "ClangFormat is not installed. Installing" | |
brew install clang-format | |
fi | |
yarn format:ios:objc | |
yarn format:fabric:ios:objc |