Aggiunto widget per commenti e allegati #781
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: tests | |
on: push | |
jobs: | |
docker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: JS tests | |
run: | | |
cd frontend/ | |
npm ci | |
npm run test | |
npm run deploy | |
npm run deploy:dev | |
- name: PHP tests | |
run: | | |
cd backend/ | |
php7.4 -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php7.4 composer-setup.php | |
php7.4 -r "unlink('composer-setup.php');" | |
sudo apt-get -y install php-mbstring php-intl php-xml php-sqlite3 php-mysql php-zip php-ldap php-gd | |
php7.4 composer.phar -n install | |
bin/cake migrations migrate | |
php7.4 vendor/bin/phpunit --debug | |
- name: Pull previous Docker image | |
run: | | |
docker pull getcaps/caps:develop | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Docker meta | |
id: meta | |
uses: crazy-max/ghaction-docker-meta@v2 | |
with: | |
images: getcaps/caps | |
tags: | | |
type=ref,event=tag | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
- name: Login to DockerHub | |
uses: docker/login-action@v1 | |
if: ${{ github.event_name != 'pull_request' }} | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
id: docker_build | |
uses: docker/build-push-action@v2 | |
if: ${{ github.event_name != 'pull_request' }} | |
with: | |
push: true | |
cache-from: type=registry,ref=getcaps/caps:develop | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Trigger update on Watchtower | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
curl -H "Authorization: Bearer ${{ secrets.WATCHTOWER_CAPS_SECRET }}" https://watchtower.caps.dm.unipi.it/v1/update | |
curl -H "Authorization: Bearer ${{ secrets.WATCHTOWER_SECRET }}" https://watchtower.pi.cs.dm.unipi.it/v1/update |