-
Notifications
You must be signed in to change notification settings - Fork 40
147 lines (128 loc) · 4.38 KB
/
Copy pathci.yml
File metadata and controls
147 lines (128 loc) · 4.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: CI
# This workflow is triggered on every push.
# It runs the backend and frontend tests and uploads the coverage to Codecov.
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
backend-and-frontend-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7.0.1
- name: Setup node
uses: actions/setup-node@v7.0.0
with:
node-version-file: IsraelHiking.Web/.nvmrc
- name: Setup dotnet
uses: actions/setup-dotnet@v6.0.0
with:
dotnet-version: '10.0'
- name: Run backend tests
run: dotnet test Tests/IsraelHiking.API.Tests --logger "junit;LogFilePath=test-result.xml" /p:CollectCoverage=true /p:CoverletOutputFormat=lcov /p:Exclude="[IsraelHiking.Common]*"
- name: Run frontend tests
run: |
cd IsraelHiking.Web
npm ci
npx playwright install --with-deps chromium
npm run test-ci
- name: Run lint
run: |
cd IsraelHiking.Web
npx ng lint
- name: Codecov upload
if: always()
uses: codecov/codecov-action@v7.0.0
with:
files: ./Tests/IsraelHiking.API.Tests/coverage.info,./IsraelHiking.Web/coverage/lcov.info
env:
CODECOV_TOKEN: fc1bea1d-f43a-437e-84d3-baef07be7454
build-android:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7.0.1
- name: Setup node
uses: actions/setup-node@v7.0.0
with:
node-version-file: IsraelHiking.Web/.nvmrc
- name: Setup Java
uses: actions/setup-java@v5.7.0
with:
distribution: 'temurin'
java-version: '21'
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4.1'
working-directory: IsraelHiking.Web/android
bundler-cache: true
- name: Build UI and set version
run: |
cd IsraelHiking.Web
npm ci
npm run build:mobile -- --no-progress
npx cap sync android
- name: Build Android Release
if: ${{ github.secret_source == 'Actions' }}
run: |
cd IsraelHiking.Web/android
bundle exec fastlane build_aab
env:
STORE_PASSWORD: ${{ secrets.MAPEAK_STORE_PASSWORD }}
PASSWORD: ${{ secrets.MAPEAK_PASSWORD }}
KEYSTORE_PATH: ${{ github.workspace }}/IsraelHiking.Web/android/app/Mapeak.jks
- name: Upload aab artifacts
if: ${{ github.secret_source == 'Actions' }}
uses: actions/upload-artifact@v7.0.1
with:
name: Mapeak_signed_${{ needs.version.outputs.version_string }}.aab
path: IsraelHiking.Web/android/app/build/outputs/bundle/release/app-release.aab
build-docker:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7.0.1
- name: Build Docker image
run: |
docker build . -t ghcr.io/israelhikingmap/website-mapeak
build-ios:
runs-on: macos-26
steps:
- name: Checkout code
uses: actions/checkout@v7.0.1
- name: Setup node
uses: actions/setup-node@v7.0.0
with:
node-version-file: IsraelHiking.Web/.nvmrc
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4.1'
working-directory: IsraelHiking.Web/ios/App
bundler-cache: true
- name: Set up Git to use PAT for private match repo
run: |
git config --global url."https://x-access-token:${{ secrets.FASTLANE_MATCH_PAT }}@github.com/IsraelHikingMap/fastlane-match".insteadOf "https://github.com/IsraelHikingMap/fastlane-match"
- name: Build UI
run: |
cd IsraelHiking.Web
npm ci
npm run build:mobile -- --no-progress
npx cap sync ios
- name: Build iOS with signing
if: ${{ github.secret_source == 'Actions' }}
run: |
cd IsraelHiking.Web/ios/App
bundle exec fastlane build_ios
env:
MATCH_PASSWORD: ${{ secrets.PASSWORD }}
- name: Upload ipa artifacts
if: ${{ github.secret_source == 'Actions' }}
uses: actions/upload-artifact@v7.0.1
with:
name: Mapeak_signed_${{ needs.version.outputs.version_string }}.ipa
path: IsraelHiking.Web/ios/App/App.ipa