Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Github Actions #52

Merged
merged 1 commit into from
Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: CI
on: [push, pull_request]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I contribute to this lib via this repo and not my fork. So there is no need to trigger the workflow twice)

jobs:
tests:
runs-on: ubuntu-latest
strategy:
max-parallel: 15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed

matrix:
php-versions: ['7.4', '8.0']
name: tests-${{ matrix.php-versions }}
steps:
- name: checkout
uses: actions/checkout@master
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fragile

Suggested change
uses: actions/checkout@master
uses: actions/checkout@v2

- name: cache-composer
uses: actions/cache@v2
with:
path: ~/.composer/cache/
key: composer-${{ matrix.php-versions }}-${{ github.sha }}
Comment on lines +14 to +18
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can be removed

- name: setup
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-versions }}
- name: composer install
run: composer update --prefer-stable
- name: Build docker
run: docker build -t httpbin .
- name: Run docker
run: docker run -d -p 8081:80 httpbin
- name: tests
run: composer test
tests-lowest:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be "merged" with the main job?
see https://github.com/jolicode/JoliNotif/blob/main/.github/workflows/ci.yml#L23-L35 for an example

runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@master
- name: cache-composer-lowest
uses: actions/cache@v2
with:
path: ~/.composer/cache/
key: composer-lowest-${{ github.sha }}
Comment on lines +36 to +40
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be removed

- name: setup
uses: shivammathur/[email protected]
with:
php-version: 7.3
- name: composer install
run: composer update --prefer-lowest --prefer-stable
- name: Build docker
run: docker build -t httpbin .
- name: Run docker
run: docker run -d -p 8081:80 httpbin
- name: tests
run: composer test
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.