Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Update README.md

Update README.md #281

name: test et build
on:
push:
branches:
- master
- dev
tags:
- 'v*'
pull_request:
branches:
- dev
- master
env:
CODECOV_TOKEN: b12c1d6f-032c-40bf-ab16-3cc301e48115
jobs:
TestAndBuild:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os : [ubuntu-20.04, windows-2019]
python: ['3.10']
env:
DISPLAY: ':99.0'
steps:
- name: get repo
uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{matrix.python}}
- name: setup linux
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y language-pack-fr pulseaudio libmtdev1 xclip
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1280x720x24 -ac +extension GLX
- name: install dev env
run: python run.py install
- name: Tests
run: python run.py test
- name: Coverage
if: runner.os == 'Linux'
run: python run.py cov
- name: build
run: |
python run.py create
briefcase build
- name: Package Windows
if: runner.os == 'Windows'
run: briefcase package
- name: check executable
run: python run.py test_executable
- name: upload on Linux binary in artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v2
with:
path: |
linux/mydevoirs
linux/mydevoirs*.AppImage
# name: MyDevoirs-${{runner.os}}64
- name: upload on Windows binary in artifact
if: runner.os == 'Windows'
uses: actions/upload-artifact@v2
with:
path: |
windows/mydevoirs
windows/mydevoirs*.msi
# name: MyDevoirs-${{runner.os}}64
Create_release:
needs: TestAndBuild
runs-on: ubuntu-latest
if: startsWith(github.event.ref, 'refs/tags/v')
steps:
- name: Download artifact binary
uses: actions/download-artifact@v2
with:
path: .
- name: new latest release on master
uses: "marvinpinto/action-automatic-releases@latest"
if: github.ref == 'refs/heads/master'
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
automatic_release_tag: "latest"
title: "MyDevoirs Latest"
files: |
artifact/mydevoirs*.msi
artifact/mydevoirs*.AppImage
- name: Display structure of downloaded files
run: ls -R
working-directory: .
- name: new tag release
uses: "marvinpinto/action-automatic-releases@latest"
if: contains(github.ref, '/tags/')
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
artifact/mydevoirs*.msi
artifact/mydevoirs*.AppImage
#
# Deploy:
# name: release github
# needs: [Test_linux, Test_windows]
# runs-on: ubuntu-latest
# if: ! contains(github.ref, "vrefs")
# steps:
# - name: Download windows binary
# uses: actions/download-artifact@v1
# with:
# name: MyDevoirs.exe
# - name: Download Linux binary
# uses: actions/download-artifact@v1
# with:
# name: MyDevoirs
# - name: release git_hub
# uses: xresloader/upload-to-github-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# file: "MyDevoirs;MyDevoirs.exe"
# tags: true
# draft: False
# release_name: MyDevoirs v${{github.ref}}
# tag_name: v${{github.ref}}