-
-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (63 loc) · 2.33 KB
/
Copy pathtest-sql-credentials.yml
File metadata and controls
71 lines (63 loc) · 2.33 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
---
name: Test SQL Credential Creation
"on":
push:
branches:
- main
paths:
- 'scripts/functions/shared/enginescript-db-credentials.sh'
- 'scripts/functions/shared/enginescript-shared-vhost.sh'
- 'scripts/functions/vhost/vhost-install.sh'
- 'scripts/functions/vhost/vhost-import.sh'
- 'scripts/install/mariadb/mariadb-install.sh'
- 'scripts/ci/test-sql-credentials.sh'
- '.github/workflows/test-sql-credentials.yml'
- 'enginescript-variables.txt'
pull_request:
paths:
- 'scripts/functions/shared/enginescript-db-credentials.sh'
- 'scripts/functions/shared/enginescript-shared-vhost.sh'
- 'scripts/functions/vhost/vhost-install.sh'
- 'scripts/functions/vhost/vhost-import.sh'
- 'scripts/install/mariadb/mariadb-install.sh'
- 'scripts/ci/test-sql-credentials.sh'
- '.github/workflows/test-sql-credentials.yml'
- 'enginescript-variables.txt'
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-mariadb-credentials:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup MariaDB 11.8 repository
run: |
# Source the MariaDB version from enginescript-variables.txt
MARIADB_VER="$(
grep '^MARIADB_VER=' enginescript-variables.txt | cut -d'"' -f2
)"
MARIADB_MAJOR_MINOR="$(echo "${MARIADB_VER}" | cut -d'.' -f1,2)"
echo "Installing MariaDB ${MARIADB_MAJOR_MINOR}"
echo "Full MariaDB version: ${MARIADB_VER}"
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup \
| sudo bash -s -- \
--mariadb-server-version="mariadb-${MARIADB_MAJOR_MINOR}"
- name: Install MariaDB and dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends mariadb-server pwgen
sudo systemctl start mariadb
sudo systemctl enable mariadb
sudo mariadb -e "SELECT VERSION();"
- name: Run SQL credential tests
run: |
chmod +x scripts/ci/test-sql-credentials.sh
scripts/ci/test-sql-credentials.sh