Skip to content

Update workflow

Update workflow #3

Workflow file for this run

name: My first CI/CD pipeline
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Download repository
uses: actions/checkout@v2
- name: Install JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
distribution: 'adopt'
- name: Build with Maven
run: mvn clean package -DskipTests
- name: Upload package .jar to deploy later
uses: actions/upload-artifact@v2
with:
name: moviecards-java
path: "${{ github.workspace }}/target/*.jar"
test:
needs: build
runs-on: ubuntu-latest
steps:
- name: Descargar repositorio
uses: actions/checkout@v2
- name: Instalar JDK 11
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"
- name: Instalar Chrome y ChromeDriver para pruebas end to end
run: |
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt --fix-broken install -y
CHROMEDRIVER_VERSION=$(curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE)
curl -L -o chromedriver.zip https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chr omedriver_linux64.zip
unzip chromedriver.zip
chmod +x chromedriver
sudo mv chromedriver /usr/local/bin/
- name: Ejecutar la aplicación para pruebas end to end
run: mvn spring-boot:run & sleep 60
- name: Ejecutar las pruebas unitarias, de integración y end to end
run: mvn clean verify
qa:
needs: test
runs-on: ubuntu-latest
steps:
- name: qa
run: echo "Ejecutando análisis de calidad!"
deploy:
needs: qa
runs-on: ubuntu-latest
steps:
- name: deploy
run: echo "Desplegando la aplicación!"