Skip to content

Fix numero di matricola. #847

Fix numero di matricola.

Fix numero di matricola. #847

Workflow file for this run

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/
sudo apt-get update
sudo apt-get install php8.1
php8.1 -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php8.1 composer-setup.php
php8.1 -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
php8.1 composer.phar -n install
bin/cake migrations migrate
php8.1 vendor/bin/phpunit --debug
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
id: meta
uses: crazy-max/ghaction-docker-meta@v2
with:
images: harbor.cs.dm.unipi.it/caps/caps
tags: |
type=ref,event=tag
type=ref,event=branch
type=semver,pattern={{version}}
- name: Login to Docker Registry
uses: docker/login-action@v2
if: ${{ github.event_name != 'pull_request' }}
with:
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
registry: harbor.cs.dm.unipi.it
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
if: ${{ github.event_name != 'pull_request' }}
with:
push: true
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