Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from shopwareLabs/migrate-to-github-action
Migrate to GitHub actions
- Loading branch information
Showing
10 changed files
with
88 additions
and
80 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Deploy | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.2' | ||
ini-values: phar.readonly=Off | ||
|
||
- name: Install dependencies | ||
run: composer install --no-dev | ||
|
||
- name: Build | ||
run: ./bin/build.sh | ||
|
||
- name: Deploy | ||
run: | | ||
mv sw.phar sw.phar.tmp | ||
git config --global user.email "development@shopware.com" | ||
git config --global user.name "shopwareBot" | ||
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY | ||
git fetch origin | ||
git checkout -t origin/gh-pages | ||
mv sw.phar.tmp sw.phar | ||
sha1sum sw.phar > sw.phar.version | ||
git add sw.phar sw.phar.version | ||
git commit -m 'Rebuilt phar' | ||
git push origin gh-pages:gh-pages |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Test | ||
|
||
on: [ push ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
php: [ 7.2, 7.3, 7.4 ] | ||
include: | ||
- php: 7.2 | ||
upload-scrutinizer: true | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
|
||
- name: Install dependencies | ||
run: composer install --no-interaction --prefer-source | ||
|
||
- name: Execute tests | ||
run: ./vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover | ||
|
||
- name: Upload to scrutinizer | ||
if: ${{ matrix.upload-scrutinizer }} | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover coverage.clover |
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
This file was deleted.
Oops, something went wrong.
Binary file not shown.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
set -e | ||
set -o pipefail | ||
|
||
# Remove some files from vendor directory | ||
./bin/cleanup_vendor.sh | ||
|
||
# Get box | ||
./bin/download_box.sh | ||
|
||
# Build PHAR | ||
./box.phar build -vv |
This file was deleted.
Oops, something went wrong.
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
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