-
-
Notifications
You must be signed in to change notification settings - Fork 91
147 lines (142 loc) · 4.54 KB
/
Copy pathtest.yml
File metadata and controls
147 lines (142 loc) · 4.54 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: test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request: { types: [opened, reopened, synchronize, ready_for_review] }
push: { branches: [ main ] }
permissions:
contents: read
jobs:
unit-tests:
permissions:
contents: read
uses: vapor/ci/.github/workflows/run-unit-tests.yml@main
with:
with_release_mode_testing: true
with_api_check: false
with_linting: true
with_musl: true
with_android: true
android_copy_files: Tests/VaporToolboxTests/Manifests/
secrets: inherit
submit-dependencies:
permissions:
contents: write
if: ${{ github.event_name == 'push' }}
uses: vapor/ci/.github/workflows/submit-deps.yml@main
secrets: inherit
test-makefile:
permissions:
contents: read
runs-on: ubuntu-latest
container: swift:6.3-noble
steps:
- name: Check out toolbox
uses: actions/checkout@v7
with:
fetch-depth: 0
fetch-tags: true
- name: Install dependencies
run: |
apt-get -qq update
apt-get -qq install -y make
- name: Config Git
run: |
git config --global --add safe.directory /__w/toolbox/toolbox
git checkout -b temp-branch
- name: Build with Makefile
run: make build
- name: Install with Makefile
run: make install DEST=/tmp/vapor MANDEST_DIR=/tmp/vapor-man/man1
- name: Test installation
run: /tmp/vapor --version
- name: Test manpage
run: |
test -f /tmp/vapor-man/man1/vapor.1
grep -q '^\.Nm vapor' /tmp/vapor-man/man1/vapor.1
- name: Uninstall with Makefile
run: |
make uninstall DEST=/tmp/vapor MANDEST_DIR=/tmp/vapor-man/man1
make clean
integration-linux:
permissions:
contents: read
if: ${{ github.event_name == 'pull_request' && !github.event.pull_request.draft }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ toJSON(matrix) }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
fluentflags:
- --no-fluent
# - --fluent.db mysql
- --fluent.db postgres
- --fluent.db sqlite
leafflags: [--leaf, --no-leaf]
include:
# - fluentflags: '--fluent.db mysql'
# dbhostname: mysql
- fluentflags: '--fluent.db postgres'
dbhostname: psql
runs-on: ubuntu-latest
container: swift:6.3-noble
services:
# mysql:
# image: mysql:latest
# env: { MYSQL_ALLOW_EMPTY_PASSWORD: 'true', MYSQL_USER: vapor_username, MYSQL_PASSWORD: vapor_password, MYSQL_DATABASE: vapor_database }
psql:
image: postgres:latest
env: { POSTGRES_USER: vapor_username, POSTGRES_DB: vapor_database, POSTGRES_PASSWORD: vapor_password,
POSTGRES_HOST_AUTH_METHOD: 'scram-sha-256', POSTGRES_INITDB_ARGS: '--auth-host=scram-sha-256' }
steps:
- name: Check out toolbox
uses: actions/checkout@v7
- name: Build toolbox
run: swift build
- name: Execute new project command
env:
FLUENTFLAGS: ${{ matrix.fluentflags }}
LEAFFLAGS: ${{ matrix.leafflags }}
run: |
swift run \
vapor new toolbox-test \
--no-commit -o /tmp/toolbox-test \
${FLUENTFLAGS} ${LEAFFLAGS}
- name: Test new project
run: swift test --package-path /tmp/toolbox-test
env:
DATABASE_HOST: ${{ matrix.dbhostname }}
integration-macos:
permissions:
contents: read
strategy:
fail-fast: false
matrix:
fluentflags:
- --no-fluent
- --fluent.db mysql
- --fluent.db postgres
- --fluent.db sqlite
leafflags: [--leaf, --no-leaf]
runs-on: macos-26
steps:
- name: Select toolchain
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
with: { xcode-version: latest-stable }
- name: Check out toolbox
uses: actions/checkout@v7
- name: Build toolbox
run: swift build
- name: Execute new project command
env:
FLUENTFLAGS: ${{ matrix.fluentflags }}
LEAFFLAGS: ${{ matrix.leafflags }}
run: |
swift run \
vapor new toolbox-test \
--no-commit -o /tmp/toolbox-test \
${FLUENTFLAGS} ${LEAFFLAGS}
- name: Test new project
run: swift build --package-path /tmp/toolbox-test