-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (57 loc) · 1.62 KB
/
continuous-integration.yaml
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
name: Continuous Integration
on:
push:
pull_request:
release:
types: [created]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [
ubuntu-22.04,
ubuntu-20.04,
macos-14,
# macos-11,
# macos-10.15,
# windows-2022,
# windows-2019,
# windows-2016
]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '21.7'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run-script buildExpoDoctor
- run: npm run-script buildLint
- run: npm run-script buildTypeScript
- run: npm run-script buildJest
- uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: xdebug
- run: composer install
- run: vendor/bin/psalm
- run: mkdir -p test_results
- run: vendor/bin/phpunit --coverage-text | tee test_results/unit
- run: grep -E "^\s*Lines:\s*100\.00%\s*\([0-9]+\/[0-9]+\)\s*$" test_results/unit
shell: bash
release:
if: github.event_name == 'release' && github.event.action == 'created'
needs: test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run-script buildTypeScript
- run: echo ${{ secrets.NPMRC }} > ${NPM_CONFIG_USERCONFIG}
- run: "sed -i \"s/\\\"version\\\": \\\"0.0.0\\\",/\\\"version\\\": \\\"${GITHUB_REF/refs\\/tags\\/v/}\\\",/g\" package.json"
- run: npm publish