Skip to content

update build.yml

update build.yml #133

Workflow file for this run

name: build
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Start services
run: scripts/start_services.sh
- name: Run test suite
run: docker compose -f docker/docker-compose.yaml exec -T app bash scripts/build.sh
- name: Upload coverage report
uses: codecov/codecov-action@v2
package:
runs-on: ubuntu-20.04
needs: build
if: contains(github.ref, 'refs/tags/v')
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Start services
run: scripts/start_services.sh
- name: Package
run: docker compose -f docker/docker-compose.yaml exec -T app bash scripts/package.sh
- name: Release
uses: softprops/action-gh-release@v1
with:
files: target/tp2-*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}