Skip to content

Fix/test work flow

Fix/test work flow #42

Workflow file for this run

name: PHPUnit Test
on:
push:
pull_request:
concurrency:
group: test
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
environment: test
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- name: Create Environment File
run: echo "TELEGRAM_BOT_TOKEN=${{ secrets.TELEGRAM_BOT_TOKEN }}" > .env
- name: Create Environment File test user id
run: echo "TEST_USER_ID=${{ secrets.TEST_USER_ID }}" >> .env
- name: Install Composer packages
run: composer install --prefer-dist --no-progress --no-suggest
- name: Run PHPUnit tests
run: ./vendor/bin/phpunit