Add quiz migration #5238
Workflow file for this run
This file contains 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: Plugin Build | |
on: | |
- pull_request | |
- workflow_call | |
jobs: | |
build: | |
name: Plugin Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Get npm cache directory | |
id: npm-cache | |
run: | | |
echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.npm-cache.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install JS dependencies | |
run: npm ci | |
- name: Install PHP dependencies and generate the third-party directory | |
uses: ./.github/actions/install-php | |
- name: Build Plugin | |
run: npm run build | |
- name: Decompress plugin | |
run: unzip sensei-lms.zip -d sensei-lms | |
- name: Store Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: sensei-lms-${{ github.event.pull_request.head.sha }} | |
path: ${{ github.workspace }}/sensei-lms/ | |
retention-days: 7 | |
syntax-check: | |
name: PHP Syntax Check | |
needs: build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: [7.3, 8.1] | |
steps: | |
- name: Download Build Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: sensei-lms-${{ github.event.pull_request.head.sha }} | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: phplint | |
coverage: none | |
- name: Check Syntax | |
run: phplint ./sensei-lms |