diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml new file mode 100644 index 0000000..ce6105b --- /dev/null +++ b/.github/workflows/coverity-scan.yml @@ -0,0 +1,53 @@ +name: coverity-scan + +on: + push: + branches: [master, github-actions] + +jobs: + coverity-build: + + runs-on: ubuntu-latest + defaults: + run: + shell: bash + + steps: + - uses: actions/checkout@v2 + - uses: php-actions/composer@v6 + - uses: actions/setup-node@v2 + + - name: install Node dependencies + run: npm install + - name: build + run: npm run build + + - name: download coverity tools + run: | + curl -Lf \ + -o cov-analysis-linux64.tar.gz \ + --form project=bfabiszewski/ulogger-server \ + --form token=$TOKEN \ + https://scan.coverity.com/download/linux64 + mkdir cov-analysis-linux64 + tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 + env: + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} + + - name: build with cov-build + run: | + export PATH=`pwd`/cov-analysis-linux64/bin:$PATH + cov-build --dir cov-int --no-command --fs-capture-search ./ --fs-capture-search-exclude-regex vendor/ --fs-capture-search-exclude-regex .tests/ --fs-capture-search-exclude-regex config.php --fs-capture-search-exclude-regex .docker/ + + - name: upload results to coverity-scan + run: | + tar czvf cov-int.tgz cov-int + curl -Lf \ + --form token=$TOKEN \ + --form email=scan.coverity@fabiszewski.net \ + --form file=@cov-int.tgz \ + --form version="`git describe --tags`" \ + --form description="ulogger-server `git describe --tags`" \ + "https://scan.coverity.com/builds?project=bfabiszewski/ulogger-server" + env: + TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b0f2505..810e710 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,7 @@ name: Tests on: push: - branches: [master, github-actions] + branches: [master] pull_request: branches: [master] diff --git a/.github/workflows/transifex.yml b/.github/workflows/transifex.yml new file mode 100644 index 0000000..0e76857 --- /dev/null +++ b/.github/workflows/transifex.yml @@ -0,0 +1,26 @@ +on: + push: + branches: [master] + +name: "Transifex synchronization" + +jobs: + upload-to-transifex: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - uses: actions/setup-python@v3 + + - name: Upload + env: + TRANSIFEX_PASSWORD: ${{ secrets.TX_TOKEN }} + run: | + if [ ! -z "$TRANSIFEX_PASSWORD" ]; then + pip install --user virtualenv + virtualenv ~/env + source ~/env/bin/activate + pip install transifex-client + echo -e "[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername = api\npassword = ${TRANSIFEX_PASSWORD}\n" > ~/.transifexrc + tx push -s --no-interactive + fi \ No newline at end of file