Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
aooohan committed Apr 10, 2024
1 parent 9cf3cef commit 627f44c
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 31 deletions.
34 changes: 3 additions & 31 deletions .github/workflows/test.yaml → .github/workflows/test-unix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ jobs:
strategy:
matrix:
# ref: https://github.com/actions/runner-images
os: [ ubuntu-latest, macos-latest, windows-latest]
os: [ ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: install vfox (Linux)
if: runner.os == 'Linux'
run: |
Expand All @@ -30,26 +32,9 @@ jobs:
echo 'eval "$(vfox activate bash)"' >> ~/.bashrc
echo 'eval "$(vfox activate zsh)"' >> ~/.zshrc
- name: install vfox (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
scoop install vfox
vfox -v
- name: Checkout code
uses: actions/checkout@v3

- name: Generate PHP plugin
if: runner.os != 'Windows'
run: |
zip -r php.zip ./
- name: Generate PHP plugin
if: runner.os == 'Windows'
run: |
Compress-Archive -Path .\* -DestinationPath .\php.zip
- name: Install packages
if: runner.os == 'Linux'
Expand All @@ -63,25 +48,12 @@ jobs:
vfox add -s php.zip
vfox install [email protected]
# php -v
# php -m
# composer -V
- name: Test
if: runner.os != 'Windows'
run: |
vfox use [email protected]
php -v
php -m
composer -V
- name: Test
if: runner.os == 'Windows'
shell: pwsh
run: |
vfox use -p [email protected]
Invoke-Expression "$(vfox activate pwsh)"
php -v
php -m
composer -V
40 changes: 40 additions & 0 deletions .github/workflows/test-windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test workflow

on:
pull_request:
# push:
schedule:
- cron: 0 0 * * 5

jobs:
plugin-test-linux:
strategy:
matrix:
# ref: https://github.com/actions/runner-images
os: [ windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: install vfox and test(Windows)
shell: pwsh
run: |
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
scoop install vfox
Compress-Archive -Path .\* -DestinationPath .\php.zip
vfox -v
vfox add -s php.zip
vfox install [email protected]
- name: Test
shell: pwsh
run: |
vfox use -p [email protected]
Invoke-Expression "$(vfox activate pwsh)"
php -v
php -m
composer -V

0 comments on commit 627f44c

Please sign in to comment.