Merge pull request #192 from X-R-G-B/dev #1597
This file contains hidden or 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: Publish | |
| on: [push, pull_request] | |
| env: | |
| MIRROR_URL: git@github.com:EpitechPromo2026/B-MUL-200-TLS-2-1-myrpg-xavier.mitault.git | |
| BINARY: "my_rpg" | |
| jobs: | |
| norm: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: set up python | |
| uses: actions/setup-python@v2 | |
| with: | |
| python-version: '3.9' | |
| - name: clone NorMatrix | |
| run: git clone https://github.com/Saverio976/NorMatrix.git | |
| - name: NorMatrix | |
| run: ./NorMatrix/main.py | |
| compil: | |
| runs-on: ubuntu-latest | |
| container: epitechcontent/epitest-docker:latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: make | |
| run: timeout 2m make | |
| - name: check binary | |
| run: | | |
| if [[ ! -f $BINARY ]]; then | |
| echo "::error title=Executable not found::$BINARY" | |
| fi | |
| tests: | |
| runs-on: ubuntu-latest | |
| container: epitechcontent/epitest-docker:latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: make tests_run | |
| run: make tests_run | |
| publish: | |
| needs: [norm, compil, tests] | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event_name == 'push' }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pixta-dev/repository-mirroring-action@v1 | |
| with: | |
| target_repo_url: | |
| ${{ env.MIRROR_URL }} | |
| ssh_private_key: | |
| ${{ secrets.KEY_GIT_PUSH }} |