Repository navigation
76 lines (65 loc) · 2.47 KB
/
Copy pathvalidate.yml
File metadata and controls
76 lines (65 loc) · 2.47 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
name: Analyze and validate SimpleSQL virion
on:
push:
branches: [main]
tags: ["v*"]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-24.04
services:
mysql:
image: mysql:8.4.5@sha256:679e7e924f38a3cbb62a3d7df32924b83f7321a602d3f9f967c01b3df18495d6
env:
MYSQL_ROOT_PASSWORD: simplesql-ci-only
MYSQL_DATABASE: simplesql_ci
ports: ["3306:3306"]
options: >-
--health-cmd="mysqladmin ping -h localhost -u root -psimplesql-ci-only"
--health-interval=10s
--health-timeout=5s
--health-retries=10
steps:
- name: Check out SimpleSQL
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Check out libasynql for static analysis
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: poggit/libasynql
ref: 270f8ae93e3271206eadd42ca81862ab9a54f322
path: .devtools-dependencies/libasynql
persist-credentials: false
- name: Check out Axolotl-PM PHP setup helper
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: axolotl-pm/setup-php-action
ref: b8c3f9add4f2ad4a5e2624a1112aba899ee8db0e
path: .devtools-dependencies/setup-php-action
persist-credentials: false
- name: Set up Axolotl-PM PHP environment
shell: bash
env:
INPUT_PHP-VERSION: "8.1"
INPUT_PM-VERSION-MAJOR: "5"
INPUT_INSTALL-PATH: ./.php-bin
run: node .devtools-dependencies/setup-php-action/dist/index.js
- name: Validate Composer metadata
run: composer validate --strict
- name: Install locked development dependencies
run: composer install --no-interaction --prefer-dist --no-progress --no-scripts --no-plugins
- name: Run PHPStan at maximum level
run: composer phpstan
- name: Run SQL load and save regression tests
env:
SIMPLESQL_MYSQL_DSN: mysql:host=127.0.0.1;port=3306;dbname=simplesql_ci
SIMPLESQL_MYSQL_USER: root
SIMPLESQL_MYSQL_PASSWORD: simplesql-ci-only
run: |
php tests/sql-load-safety.php
php tests/save-lifecycle.php
php tests/pair-sql-atomicity.php
- name: Lint PHP source and tests
run: find src tests -name '*.php' -print0 | xargs -0 -n1 php -l