PHPLIB-1506 Import mongodb/builder
#1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Static Analysis" | |
on: | |
merge_group: | |
pull_request: | |
branches: | |
- "v*.*" | |
- "master" | |
- "feature/*" | |
push: | |
branches: | |
- "v*.*" | |
- "master" | |
- "feature/*" | |
workflow_call: | |
inputs: | |
ref: | |
description: "The git ref to check" | |
type: string | |
required: true | |
env: | |
PHP_VERSION: "8.2" | |
# TODO: change to "stable" once 1.20.0 is released | |
# DRIVER_VERSION: "stable" | |
DRIVER_VERSION: "mongodb/[email protected]" | |
jobs: | |
psalm: | |
name: "Code Generator" | |
runs-on: "ubuntu-22.04" | |
steps: | |
- name: "Checkout" | |
uses: "actions/checkout@v4" | |
with: | |
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }} | |
- name: "Setup" | |
uses: "./.github/actions/setup" | |
with: | |
php-version: ${{ env.PHP_VERSION }} | |
driver-version: ${{ env.DRIVER_VERSION }} | |
working-directory: "generator" | |
- name: "Run Generator" | |
run: "generator/generate" | |
- name: "Check file diff" | |
run: git add . -N && git diff --exit-code |