Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #85
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: oxrun ci | |
on: ["push"] # "pull_request" | |
jobs: | |
stand_alone_checks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Validate composer.json | |
run: composer validate | |
- name: validate php syntax | |
run: find . -not -path "./vendor/*" -name "*.php" -print0 | xargs -0 -n1 -P8 php -l | |
tests: | |
needs: stand_alone_checks | |
strategy: | |
matrix: | |
oxid: | |
- metapackage: "6.5" | |
php: "8.0" | |
- metapackage: "6.3" | |
php: "8.0" | |
- metapackage: "6.2" | |
php: "7.4" | |
runs-on: ubuntu-latest | |
container: | |
image: oxidesales/oxideshop-docker-php:${{matrix.oxid.php}} | |
env: | |
COMPILATION_VERSION: dev-b-${{matrix.oxid.metapackage}}-ce | |
DOCKER_DOCUMENT_ROOT: /var/www/oxid-esale | |
MYSQL_HOST: oxid_db | |
MYSQL_DATABASE: 'oxid' | |
MYSQL_USER: "oxid" | |
MYSQL_PASSWORD: "oxid" | |
OXID_SHOP_URL: "http://localhost" | |
services: | |
oxid_db: | |
image: mysql:5.7 | |
env: | |
MYSQL_DATABASE: oxid | |
MYSQL_USER: oxid | |
MYSQL_PASSWORD: oxid | |
MYSQL_ROOT_PASSWORD: oxid | |
TZ: Europe/Berlin | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Setup Oxid eSale | |
run: bash ./docker/bin/installOxid.sh | |
- name: PHPUnit | |
run: ./vendor/bin/phpunit --debug --stop-on-error --stop-on-failure | |
- name: run oe-console | |
run: ${DOCKER_DOCUMENT_ROOT}/vendor/bin/oe-console | |
- name: run oxrun-light | |
run: ${DOCKER_DOCUMENT_ROOT}/vendor/bin/oxrun-light | |
- name: save coverage report | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: code-coverage-report | |
path: build/logs/clover.xml | |
retention-days: 1 | |
- name: create new readme | |
run: | | |
rm -Rf ${DOCKER_DOCUMENT_ROOT}/source/tmp/* | |
rm -Rf ${GITHUB_WORKSPACE}/vendor | |
bash ./docker/bin/updateReadmeDoc.sh "${DOCKER_DOCUMENT_ROOT}/vendor/bin/oxrun-light" | |
- name: save oxrun-description | |
if: ${{ github.ref == 'refs/heads/master' }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: oxrun-description | |
path: README.md | |
retention-days: 1 | |
finish-code-coverage: | |
if: ${{ github.ref == 'refs/heads/master' }} | |
needs: tests | |
runs-on: ubuntu-latest | |
container: | |
image: composer:latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: download coverage report | |
uses: actions/[email protected] | |
with: | |
name: code-coverage-report | |
- name: remove artifact coverage report | |
uses: geekyeggo/delete-artifact@v1 | |
with: | |
name: code-coverage-report | |
- name: Install Coveralls | |
run: composer global require php-coveralls/php-coveralls | |
- name: Coveralls Finished | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
mkdir -p ./build/logs/ | |
mv ./clover.xml ./build/logs/ | |
${COMPOSER_HOME}/vendor/bin/php-coveralls -v | |
finish-reademe: | |
if: ${{ github.ref == 'refs/heads/master' }} | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: download oxrun-description | |
uses: actions/[email protected] | |
with: | |
name: oxrun-description | |
- name: remove artifact oxrun-description | |
uses: geekyeggo/delete-artifact@v1 | |
with: | |
name: oxrun-description | |
- name: commit readme | |
continue-on-error: true | |
run: | | |
git config --global user.name "Github Action" | |
git config --global user.email '[email protected]' | |
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | |
git add ${GITHUB_WORKSPACE}/README.md | |
git commit --message "Updated commands docu in README.md. (#$GITHUB_RUN_NUMBER) [ci skip]" | |
git push -u origin HEAD:${{ github.ref }} |