From d2459b9c26a4eed9418a9222fcc60e50525eb8c5 Mon Sep 17 00:00:00 2001 From: MonTransit Bot <84137772+montransit@users.noreply.github.com> Date: Tue, 6 Aug 2024 12:41:15 +0000 Subject: [PATCH] CI: sync code --- .github/workflows/mt-download-data.yml | 50 +++++++++++++++++++++++++ .github/workflows/mt-sync-code-data.yml | 35 +++++++++-------- .gitignore | 2 + agency-parser/.gitignore | 1 + commons | 2 +- commons-java | 2 +- parser | 2 +- 7 files changed, 73 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/mt-download-data.yml diff --git a/.github/workflows/mt-download-data.yml b/.github/workflows/mt-download-data.yml new file mode 100644 index 0000000..556f2d7 --- /dev/null +++ b/.github/workflows/mt-download-data.yml @@ -0,0 +1,50 @@ +name: MT download data +on: + workflow_dispatch: # manual + schedule: + - cron: '0 18 * * 1,3,5' # At 18:00 on Monday, Wednesday, and Friday # https://crontab.guru/#0_18_*_*_1,3,5 +# gh workflow run mt-download-data.yml --ref mmathieum +# gh run list --workflow=mt-download-data.yml +# gh run watch ; gh browse --branch mmathieum +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true +env: + # git commit & push + MT_ORG_GIT_COMMIT_ON: ${{ secrets.MT_ORG_GIT_COMMIT_ON }} + MT_ORG_GIT_COMMIT_OFF: ${{ secrets.MT_ORG_GIT_COMMIT_OFF }} + MT_GIT_COMMIT_ON: ${{ secrets.MT_GIT_COMMIT_ON }} + MT_GIT_COMMIT_OFF: ${{ secrets.MT_GIT_COMMIT_OFF }} +jobs: + MT-DOWNLOAD-DATA-JOB: + if: ${{ ! contains(github.repository, '-bike-') && ! endsWith(github.repository, '/mtransit-for-android') }} + name: "MT Download Data" + timeout-minutes: 30 + runs-on: ubuntu-latest + steps: + - name: MT check out main repository code (no submodules) + uses: actions/checkout@v4 + with: + ref: mmathieum + submodules: true # required to set right token + token: ${{ secrets.MT_PAT }} + fetch-depth: 0 # fetch all (not required util release build) + - name: MT check out submodules + run: ./checkout_submodules.sh + - name: MT setup MT_GIT_BRANCH env + if: github.event_name != 'pull_request' + run: | + echo "MT_GIT_BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV + - name: MT code sync + # if: github.event_name != 'pull_request' + if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} + run: ./commons/code_sync.sh + - name: MT code setup + run: ./commons/code_setup.sh + - name: MT commit code change + run: ./commit_code_change.sh + - name: MT download data + timeout-minutes: 10 + run: ./agency-parser/download.sh + - name: MT push commits + run: ./push_commits.sh diff --git a/.github/workflows/mt-sync-code-data.yml b/.github/workflows/mt-sync-code-data.yml index b23f180..2b77b72 100644 --- a/.github/workflows/mt-sync-code-data.yml +++ b/.github/workflows/mt-sync-code-data.yml @@ -3,7 +3,6 @@ on: workflow_dispatch: # manual schedule: - cron: '0 12 * * 2' # Tuesdays @ 12pm UTC # WEEKLY https://crontab.guru/#0_12_*_*_2 -# - cron: '0 12 * * 1,4' # 0 0 * * MON,THU #BI-WEEKLY https://crontab.guru/#0_12_*_*_1,4 # gh workflow run mt-sync-code-data.yml --ref mmathieum # gh run list --workflow=mt-sync-code-data.yml # gh run watch ; gh browse --branch mmathieum @@ -92,23 +91,23 @@ jobs: # run: ./test.sh # env: # MT_ENCRYPT_KEY: ${{ secrets.MT_ENCRYPT_KEY }} - - name: MT artifact > unit tests XML results - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} # even if tests fails - with: - name: unit-test-xml-results - path: | - */build/test-results/**/*.xml - */build/test-results/*.xml - */build/reports/*.xml - - name: MT artifact > HTML reports - uses: actions/upload-artifact@v4 - if: ${{ !cancelled() }} # even if tests fails - with: - name: html-reports - path: | - */build/reports/ - !**/*.xml + # - name: MT artifact > unit tests XML results + # uses: actions/upload-artifact@v4 + # if: ${{ !cancelled() }} # even if tests fails + # with: + # name: unit-test-xml-results + # path: | + # */build/test-results/**/*.xml + # */build/test-results/*.xml + # */build/reports/*.xml + # - name: MT artifact > HTML reports + # uses: actions/upload-artifact@v4 + # if: ${{ !cancelled() }} # even if tests fails + # with: + # name: html-reports + # path: | + # */build/reports/ + # !**/*.xml - name: MT commit code change run: ./commit_code_change.sh - name: MT download & parse diff --git a/.gitignore b/.gitignore index 7ad460b..cc596b7 100644 --- a/.gitignore +++ b/.gitignore @@ -160,6 +160,8 @@ dev.properties /app_pidcat_debug.sh /app_pidcat_release.sh /app_setup.sh +/app_start_debug.sh +/app_start_release.sh /app_uninstall_debug.sh /assemble_release.sh /commit_code_change.sh diff --git a/agency-parser/.gitignore b/agency-parser/.gitignore index 902c514..e07e802 100644 --- a/agency-parser/.gitignore +++ b/agency-parser/.gitignore @@ -20,6 +20,7 @@ hs_err_pid* *.iml # Shared files +/archive.sh /build.gradle /download.sh /download_openssl_allow_tls1_0.cnf diff --git a/commons b/commons index cb55298..6446ace 160000 --- a/commons +++ b/commons @@ -1 +1 @@ -Subproject commit cb55298257bc3d1f2f33e4c9dfc1ceca960b134e +Subproject commit 6446ace6828792413bd0c430a56bccc1b9a3994a diff --git a/commons-java b/commons-java index 98c476c..beccc70 160000 --- a/commons-java +++ b/commons-java @@ -1 +1 @@ -Subproject commit 98c476c155bcd0ad58c6ec3f39a1590bc97bc219 +Subproject commit beccc709a301731d6aac006215c56268ec121952 diff --git a/parser b/parser index 8a9ec0d..42047ee 160000 --- a/parser +++ b/parser @@ -1 +1 @@ -Subproject commit 8a9ec0d36ba41048471d00803b1a1f446f21ff87 +Subproject commit 42047eeb6e8460773fa2be449974695d269f0caa