summaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2022-04-05 14:40:13 +0200
committerAndrej Mihajlov <and@mullvad.net>2022-08-03 15:13:33 +0200
commite6addcb8d673312b20ead6f3229a42c14da69934 (patch)
tree2d87106ceb42cec49f28b6c39b1576bda8f0d60d /.github/workflows
parent8a094005ac3e1289e416cf2d85fd47b2904505cf (diff)
downloadmullvadvpn-e6addcb8d673312b20ead6f3229a42c14da69934.tar.xz
mullvadvpn-e6addcb8d673312b20ead6f3229a42c14da69934.zip
Add swift-format
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ios.yml28
1 files changed, 23 insertions, 5 deletions
diff --git a/.github/workflows/ios.yml b/.github/workflows/ios.yml
index c1defce099..3e4998dc5d 100644
--- a/.github/workflows/ios.yml
+++ b/.github/workflows/ios.yml
@@ -2,11 +2,29 @@ name: iOS app
on:
pull_request:
paths:
- - .github/workflows/ios.yml
- - ios/**
+ - ".github/workflows/ios.yml"
+ - "ios/.swiftformat"
+ - "ios/**/*.swift"
# Build if requested manually from the Actions tab
workflow_dispatch:
jobs:
+ check-formatting:
+ name: Check formatting
+ runs-on: macos-11
+ steps:
+ - name: Install SwiftFormat
+ run: |
+ brew update
+ brew upgrade swiftformat
+
+ - name: Checkout repository
+ uses: actions/checkout@v3
+
+ - name: Check formatting
+ run: |
+ swiftformat --version
+ swiftformat --lint .
+
test:
name: Unit tests
runs-on: macos-11
@@ -17,10 +35,10 @@ jobs:
source_packages_dir: .spm
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Configure cache
- uses: actions/cache@v2
+ uses: actions/cache@v3
with:
path: ios/${{ env.source_packages_dir }}
key: ${{ runner.os }}-spm-${{ hashFiles('ios/**/Package.resolved') }}
@@ -28,7 +46,7 @@ jobs:
${{ runner.os }}-spm-
- name: Setup go-lang
- uses: actions/setup-go@v2
+ uses: actions/setup-go@v3
with:
go-version: '1.16.5'