chore: swap makefile for justfile (#376) #866
This file contains hidden or 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: 'CI' | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: ~ | |
| workflow_dispatch: ~ | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: extractions/setup-just@v3 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.5' | |
| - name: install dependencies | |
| run: just install | |
| - name: lint | |
| run: just lint | |
| run-tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| phpversion: ['8.1', '8.2', '8.3', '8.4', '8.5'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: extractions/setup-just@v3 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.phpversion }} | |
| coverage: xdebug | |
| - name: get composer cache directory | |
| id: composer-cache | |
| run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
| - name: cache dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-${{ matrix.phpversion }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.phpversion }}-composer- | |
| - name: install dependencies | |
| run: just install | |
| - name: test with phpunit on ${{ matrix.phpversion }} | |
| run: EASYPOST_TEST_API_KEY=123 EASYPOST_PROD_API_KEY=123 just coverage | |
| - name: Coveralls | |
| if: github.ref == 'refs/heads/master' | |
| env: | |
| COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: ./bin/php-coveralls --coverage_clover=build/logs/clover.xml -v | |
| docs: | |
| if: github.ref == 'refs/heads/master' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: extractions/setup-just@v3 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.5' | |
| - name: Install Dependencies | |
| run: just install | |
| - name: Generate Docs | |
| run: just docs | |
| - name: Deploy Docs | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: docs |