Skip to content

feat(ios): Added ios support to existing project #4283

feat(ios): Added ios support to existing project

feat(ios): Added ios support to existing project #4283

Workflow file for this run

name: Dart CI
on:
pull_request:
concurrency:
group: dart-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
dart-ci:
name: Dart CI
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
with:
fetch-depth: 0
- name: Login to GHCR
uses: docker/login-action@e92390c5fb421da1463c202d546fed0ec5c39f20 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3
- name: Install dart
uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 # v1
- name: Setup
run: ./tool/setup.sh
- name: Check up-to-date pubspec.lock
run: |
if [ -n "$(git status --porcelain)" ]; then
git --no-pager diff
exit 1
fi
- name: Check formatting
run: melos run format:check
- name: Lint code
run: melos run analyze
- name: Run tests
run: |
mapfile -t packages < <(melos list --parsable --diff=${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }}..${{ github.event.pull_request.head.sha }} --include-dependents | xargs -r -n1 basename)
if [ -z "$packages" ]; then exit 0; fi
packages_glob="$(printf ",%s" "${packages[@]}")"
packages_glob="${packages_glob:1}"
if [ -n "$packages_glob" ]; then
if [[ "$packages_glob" == *"nextcloud"* ]]; then
./tool/build-dev-container.sh
fi
MELOS_PACKAGES="$packages_glob" melos test
else
./tool/build-dev-container.sh
melos test
fi
- name: Setup Codecov
run: |
cd /tmp
curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
curl -Os https://uploader.codecov.io/latest/linux/codecov
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM
chmod +x codecov
mkdir /tmp/bin
mv codecov /tmp/bin
- name: Upload coverage to Codecov
run: |
export PATH="$PATH:/tmp/bin"
melos exec --file-exists="coverage/lcov.info" --concurrency=1 -- "
codecov --verbose upload-process --fail-on-error -F MELOS_PACKAGE_NAME -f MELOS_PACKAGE_PATH/coverage/lcov.info -t ${{ secrets.CODECOV_TOKEN }}
"