From 9ff3fa158c4962318dd7bb63853f63018f7ec669 Mon Sep 17 00:00:00 2001 From: Oliver Kopp Date: Tue, 28 Jul 2020 08:12:53 +0200 Subject: [PATCH] Change schedule for testing --- .github/workflows/automerge.yml | 24 -- .github/workflows/check-links.yaml | 5 +- .../workflows/check-outdated-dependencies.yml | 26 -- .github/workflows/cleanup_pr.yml | 36 --- .github/workflows/deployment.yml | 140 ----------- .github/workflows/refresh-csl-subtrees.yml | 47 ---- .github/workflows/snap.yml | 41 ---- .github/workflows/stale.yml | 18 -- .github/workflows/tests-fetchers.yml | 57 ----- .github/workflows/tests.yml | 225 ------------------ 10 files changed, 1 insertion(+), 618 deletions(-) delete mode 100644 .github/workflows/automerge.yml delete mode 100644 .github/workflows/check-outdated-dependencies.yml delete mode 100644 .github/workflows/cleanup_pr.yml delete mode 100644 .github/workflows/deployment.yml delete mode 100644 .github/workflows/refresh-csl-subtrees.yml delete mode 100644 .github/workflows/snap.yml delete mode 100644 .github/workflows/stale.yml delete mode 100644 .github/workflows/tests-fetchers.yml delete mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml deleted file mode 100644 index beb10bfbdb55..000000000000 --- a/.github/workflows/automerge.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Automerge Pull Requests -on: [pull_request] - -jobs: - automerge: - name: Automerge Dependabot - runs-on: ubuntu-latest - if: github.actor == 'dependabot[bot]' - steps: - - name: 'Wait for status checks' - id: waitforstatuschecks - uses: "WyriHaximus/github-action-wait-for-status@0.1.0" - with: - ignoreActions: automerge - checkInterval: 13 - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - - name: Merge pull requests - uses: pascalgn/automerge-action@v0.8.5 - if: steps.waitforstatuschecks.outputs.status == 'success' - env: - MERGE_METHOD: "squash" - MERGE_LABELS: "" - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/check-links.yaml b/.github/workflows/check-links.yaml index 805a111f56dd..33f4f3781caa 100644 --- a/.github/workflows/check-links.yaml +++ b/.github/workflows/check-links.yaml @@ -1,9 +1,6 @@ name: Check external href links in the documentation -on: - schedule: - # Run on the first of each month at 9:00 AM (See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07) - - cron: "0 9 1 * *" +on: [push, pull_request] jobs: markdown-link-check: diff --git a/.github/workflows/check-outdated-dependencies.yml b/.github/workflows/check-outdated-dependencies.yml deleted file mode 100644 index 71055d457852..000000000000 --- a/.github/workflows/check-outdated-dependencies.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Check dependencies - -on: - schedule: - - cron: '0 0 * * TUE' # Run every Tuesday (after dependabot, which runs Monday) - -jobs: - checkDependencies: - name: Check dependencies - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: 14 - - name: Look for outdated dependencies - run: ./gradlew -q checkOutdatedDependencies - - name: Report issues - if: failure() - uses: JasonEtco/create-an-issue@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - filename: .github/outdatedDependencies.md diff --git a/.github/workflows/cleanup_pr.yml b/.github/workflows/cleanup_pr.yml deleted file mode 100644 index 5131865fc977..000000000000 --- a/.github/workflows/cleanup_pr.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Cleanup after PR - -on: - pull_request: - types: [closed] - -jobs: - cleanup: - runs-on: ubuntu-latest - - steps: - - name: Check secrets presence - id: checksecrets - shell: bash - run: | - if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then - echo ::set-output name=secretspresent::false - else - echo ::set-output name=secretspresent::true - fi - env: - BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }} - - name: Extract branch name - id: extract_branch - if: ${{ steps.checksecrets.outputs.secretspresent }} - run: | - echo "##[set-output name=branch;]$(echo ${{ github.event.pull_request.head.ref }})" - - name: Delete folder on builds.jabref.org - if: ${{ steps.checksecrets.outputs.secretspresent }} - uses: appleboy/ssh-action@v0.1.2 - with: - script: rm -rf /var/www/builds.jabref.org/www/${{ steps.extract_branch.outputs.branch }} || true - host: build-upload.jabref.org - port: 9922 - username: jrrsync - key: ${{ secrets.buildJabRefPrivateKey }} diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml deleted file mode 100644 index 02a12b4846e0..000000000000 --- a/.github/workflows/deployment.yml +++ /dev/null @@ -1,140 +0,0 @@ -name: Deployment - -on: - push: - branches: - - master - - master-release - paths-ignore: - - 'docs/**' - - 'src/test/**' - - 'README.md' - pull_request: - paths-ignore: - - 'docs/**' - - 'src/test/**' - - 'README.md' - -env: - SpringerNatureAPIKey: ${{ secrets.SpringerNatureAPIKey }} - AstrophysicsDataSystemAPIKey: ${{ secrets.AstrophysicsDataSystemAPIKey }} - IEEEAPIKey: ${{ secrets.IEEEAPIKey }} - -jobs: - build: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macOS-latest] - include: - - os: ubuntu-latest - displayName: linux - archivePortable: tar -c -C build/distribution JabRef | pigz --rsyncable > build/distribution/JabRef-portable_linux.tar.gz && rm -R build/distribution/JabRef - - os: windows-latest - displayName: windows - archivePortable: 7z a -r build/distribution/JabRef-portable_windows.zip ./build/distribution/JabRef && rm -R build/distribution/JabRef - - os: macOS-latest - displayName: macOS - archivePortable: brew install pigz && tar -c -C build/distribution JabRef.app | pigz --rsyncable > build/distribution/JabRef-portable_macos.tar.gz && rm -R build/distribution/JabRef.app - - runs-on: ${{ matrix.os }} - name: Create installer and portable version for ${{ matrix.displayName }} - - steps: - - name: Fetch all history for all tags and branches - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.4 - with: - versionSpec: '5.2.x' - - name: Run GitVersion - id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.4 - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: 14 - - name: Restore gradle cache - uses: actions/cache@master - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Build runtime image - run: ./gradlew -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jlinkZip - - name: Build installer - run: ./gradlew -i -PprojVersion="${{ steps.gitversion.outputs.AssemblySemVer }}" -PprojVersionInfo="${{ steps.gitversion.outputs.InformationalVersion }}" jpackage - shell: bash - - name: Package application image - run: ${{ matrix.archivePortable }} - shell: bash - - name: Rename files - run: | - get-childitem -Path build/distribution/* - get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "${{ steps.gitversion.outputs.AssemblySemVer }}","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}"} - get-childitem -Path build/distribution/* | rename-item -NewName {$_.name -replace "portable","${{ steps.gitversion.outputs.Major }}.${{ steps.gitversion.outputs.Minor }}-portable"} - shell: pwsh - - name: Upload to GitHub workflow artifacts store - uses: actions/upload-artifact@master - with: - name: JabRef-${{ matrix.displayName }} - path: build/distribution - deploy: - name: Deploy binaries on builds.jabref.org - runs-on: ubuntu-latest - needs: [build] - steps: - - name: Check secrets presence - id: checksecrets - shell: bash - run: | - if [ "$BUILDJABREFPRIVATEKEY" == "" ]; then - echo ::set-output name=secretspresent::false - else - echo ::set-output name=secretspresent::true - fi - env: - BUILDJABREFPRIVATEKEY: ${{ secrets.buildJabRefPrivateKey }} - - name: Checkout source - uses: actions/checkout@v2 - - name: Fetch all history for all tags and branches - run: git fetch --prune --unshallow - - name: Install GitVersion - uses: gittools/actions/gitversion/setup@v0.9.4 - with: - versionSpec: '5.2.x' - - name: Run GitVersion - id: gitversion - uses: gittools/actions/gitversion/execute@v0.9.4 - - name: Get linux binaries - uses: actions/download-artifact@master - with: - name: JabRef-linux - path: build/distribution - - name: Get windows binaries - uses: actions/download-artifact@master - with: - name: JabRef-windows - path: build/distribution - - name: Get macOS binaries - uses: actions/download-artifact@master - with: - name: JabRef-macOS - path: build/distribution/ - - name: Deploy to builds.jabref.org - id: deploy - if: ${{ steps.checksecrets.outputs.secretspresent }} - uses: Pendect/action-rsyncer@v1.1.0 - env: - DEPLOY_KEY: ${{ secrets.buildJabRefPrivateKey }} - BRANCH: ${{ steps.gitversion.outputs.branchName }} - with: - flags: -vaz --itemize-changes --stats --partial-dir=/tmp/partial --rsync-path="mkdir -p /var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }} && rsync" - options: '' - ssh_options: '-p 9922' - src: 'build/distribution/' - dest: jrrsync@build-upload.jabref.org:/var/www/builds.jabref.org/www/${{ steps.gitversion.outputs.branchName }}/ - diff --git a/.github/workflows/refresh-csl-subtrees.yml b/.github/workflows/refresh-csl-subtrees.yml deleted file mode 100644 index 6105da186cc0..000000000000 --- a/.github/workflows/refresh-csl-subtrees.yml +++ /dev/null @@ -1,47 +0,0 @@ -name: Refresh Citation Style Language Files - -on: - push: - paths: - - '.github/workflows/refresh-csl-subtrees.yml' - - 'src/main/resources/csl-locales/**' - schedule: - # run on 1st and 15th of each month - - cron: '1 2 1,15 * *' - -jobs: - publish: - name: Refresh Citation Style Language Files - runs-on: ubuntu-latest - if: github.repository == 'JabRef/jabref' - steps: - - name: Checkout source - uses: actions/checkout@v2 - with: - ref: master - fetch-depth: 0 - - name: Add csl-styles remote - run: git remote add -f csl-styles https://github.com/citation-style-language/styles.git - - name: Update csl-styles - run: | - git checkout master - git config --local core.editor /usr/bin/cat - git config user.name "github actions" - git config user.email "jabrefmail+webfeedback@gmail.com" - git subtree pull --prefix src/main/resources/csl-styles csl-styles master --squash - - name: Add csl-locales remote - run: git remote add -f csl-locales https://github.com/citation-style-language/locales.git - - name: Update csl-locales - run: | - git subtree pull --prefix src/main/resources/csl-locales csl-locales master --squash - - uses: ad-m/github-push-action@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: master - - name: Report issues - if: failure() - uses: JasonEtco/create-an-issue@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - filename: .github/failure-csl-update.md diff --git a/.github/workflows/snap.yml b/.github/workflows/snap.yml deleted file mode 100644 index 04f9ee9f41c6..000000000000 --- a/.github/workflows/snap.yml +++ /dev/null @@ -1,41 +0,0 @@ -name: Snap - -on: - push: - branches: - - snapcraft - schedule: - # run on each day - - cron: "33 4 * * *" - -jobs: - build: - runs-on: ubuntu-latest - name: Create snapcraft image - - steps: - - name: Check secrets presence - id: checksecrets - shell: bash - run: | - if [ "SNAPCRAFT_LOGIN_FILE" == "" ]; then - echo ::set-output name=secretspresent::false - else - echo ::set-output name=secretspresent::true - fi - env: - SNAPCRAFT_LOGIN_FILE: ${{ secrets.SNAPCRAFT_LOGIN_FILE }} - - name: Checkout source - uses: actions/checkout@v2 - # The image relies on https://builds.jabref.org/master/JabRef-5.0-portable_linux.tar.gz^ - # See snap/snapcraft.yml for details - - name: Build snap (1) Run build - uses: snapcore/action-build@v1 - id: snapcraft - - name: Build snap (2) Upload snap - if: ${{ steps.checksecrets.outputs.secretspresent }} - uses: snapcore/action-publish@v1 - with: - store_login: ${{ secrets.SNAPCRAFT_LOGIN_FILE }} - snap: ${{ steps.snapcraft.outputs.snap }} - release: edge diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index db8e6e705ef3..000000000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Mark stale issues and pull requests - -on: - schedule: - - cron: "0 0 * * *" - -jobs: - stale: - runs-on: ubuntu-latest - - steps: - - uses: actions/stale@master - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - stale-issue-message: 'This issue will be closed in 7 days due to inactivity :zzz: Please provide the requested information if the problem persists.' - stale-issue-label: 'status: stale' - days-before-stale: 30 - only-labels: 'status: waiting-for-customer-feedback' diff --git a/.github/workflows/tests-fetchers.yml b/.github/workflows/tests-fetchers.yml deleted file mode 100644 index 9d30f9c7864a..000000000000 --- a/.github/workflows/tests-fetchers.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Fetcher Tests - -on: - push: - branches: - - master - paths: - - 'src/main/java/org/jabref/logic/importer/fetcher/**' - - 'src/test/java/org/jabref/logic/importer/fetcher/**' - - '.github/workflows/tests-fetchers.yml' - - 'build.gradle' - pull_request: - paths: - - 'src/main/java/org/jabref/logic/**' - - 'src/test/java/org/jabref/logic/**' - - 'src/main/java/org/jabref/model/**' - - 'src/test/java/org/jabref/model/**' - - '.github/workflows/tests-fetchers.yml' - - 'build.gradle' - schedule: - # run on each Wednesday - - cron: '2 3 * * 3' - -env: - SpringerNatureAPIKey: ${{ secrets.SpringerNatureAPIKey }} - AstrophysicsDataSystemAPIKey: ${{ secrets.AstrophysicsDataSystemAPIKey }} - IEEEAPIKey: ${{ secrets.IEEEAPIKey }} - -jobs: - fetchertests: - name: Fetcher tests - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: 14 - - uses: actions/cache@v1 - name: Restore gradle chache - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: | - ${{ runner.OS }}-gradle-${{ env.cache-name }}- - ${{ runner.OS }}-gradle- - ${{ runner.OS }}- - - uses: actions/cache@v1 - name: Restore gradle wrapper - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - name: Run fetcher tests - run: ./gradlew fetcherTest - env: - CI: "true" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml deleted file mode 100644 index d2568960878e..000000000000 --- a/.github/workflows/tests.yml +++ /dev/null @@ -1,225 +0,0 @@ -name: Tests - -on: - push: - branches: - - master - pull_request: - # always run on pull requests - -env: - SpringerNatureAPIKey: ${{ secrets.SpringerNatureAPIKey }} - AstrophysicsDataSystemAPIKey: ${{ secrets.AstrophysicsDataSystemAPIKey }} - IEEEAPIKey: ${{ secrets.IEEEAPIKey }} - -jobs: - checkstyle: - name: Checkstyle - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: 14 - - uses: actions/cache@v1 - name: Restore gradle cache - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: | - ${{ runner.OS }}-gradle-${{ env.cache-name }}- - ${{ runner.OS }}-gradle- - ${{ runner.OS }}- - - uses: actions/cache@v1 - name: Restore gradle wrapper - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - name: Run checkstyle - run: ./gradlew checkstyleMain checkstyleTest checkstyleJmh - - name: Run markdown-lint - uses: avto-dev/markdown-lint@v1 - with: - args: CHANGELOG.md CONTRIBUTING.md README.md docs/ - config: '.markdownlint.yml' - tests: - name: Unit tests - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: 14 - - uses: actions/cache@v1 - name: Restore gradle chache - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: | - ${{ runner.OS }}-gradle-${{ env.cache-name }}- - ${{ runner.OS }}-gradle- - ${{ runner.OS }}- - - uses: actions/cache@v1 - name: Restore gradle wrapper - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - name: Run tests - run: xvfb-run --auto-servernum ./gradlew check -x checkstyleJmh -x checkstyleMain -x checkstyleTest - env: - CI: "true" - - name: Format failed test results - if: failure() - run: | - sudo apt-get install -qq -y xml-twig-tools xsltproc - scripts/after-failure.sh - databasetests: - name: Database tests - runs-on: ubuntu-latest - services: - postgres: - image: postgres:10.8 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - steps: - - name: Checkout source - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: 14 - - uses: actions/cache@v1 - name: Restore gradle chache - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: | - ${{ runner.OS }}-gradle-${{ env.cache-name }}- - ${{ runner.OS }}-gradle- - ${{ runner.OS }}- - - uses: actions/cache@v1 - name: Restore gradle wrapper - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - name: Run tests on PostgreSQL - run: ./gradlew databaseTest --rerun-tasks - env: - CI: "true" - DBMS: "postgresql" - - name: Shutdown Ubuntu MySQL - run: sudo service mysql stop # Shutdown the Default MySQL, "sudo" is necessary, please not remove it - - name: Start custom MySQL - uses: mirromutth/mysql-action@v1.1 - with: - host port: 3800 - container port: 3307 - character set server: 'utf8' - collation server: 'utf8_general_ci' - mysql version: '8.0' - mysql database: 'jabref' - mysql root password: 'root' - - name: Run tests on MySQL - run: ./gradlew databaseTest --rerun-tasks - env: - CI: "true" - DBMS: "mysql" - guitests: - name: GUI tests - runs-on: ubuntu-latest - steps: - - name: Checkout source - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: 14 - - uses: actions/cache@v1 - name: Restore gradle chache - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: | - ${{ runner.OS }}-gradle-${{ env.cache-name }}- - ${{ runner.OS }}-gradle- - ${{ runner.OS }}- - - uses: actions/cache@v1 - name: Restore gradle wrapper - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - name: Run GUI tests - run: xvfb-run --auto-servernum ./gradlew guiTest - env: - CI: "true" - codecoverage: - name: Code coverage - runs-on: ubuntu-latest - services: - postgres: - image: postgres:10.8 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: postgres - ports: - - 5432:5432 - # needed because the postgres container does not provide a healthcheck - options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - steps: - - name: Check secrets presence - id: checksecrets - shell: bash - run: | - if [ "CODECOV_TOKEN" == "" ]; then - echo ::set-output name=secretspresent::false - else - echo ::set-output name=secretspresent::true - fi - env: - SNAPCRAFT_LOGIN_FILE: ${{ secrets.CODECOV_TOKEN }} - - name: Checkout source - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v1 - with: - java-version: 14 - - uses: actions/cache@v1 - name: Restore gradle chache - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} - restore-keys: | - ${{ runner.OS }}-gradle-${{ env.cache-name }}- - ${{ runner.OS }}-gradle- - ${{ runner.OS }}- - - uses: actions/cache@v1 - name: Restore gradle wrapper - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - name: Update test coverage metrics - if: ${{ steps.checksecrets.outputs.secretspresent }} - run: xvfb-run --auto-servernum ./gradlew jacocoTestReport && bash <(curl -s https://codecov.io/bash); - env: - CI: "true" - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - DBMS: "postgresql" - # This is https://github.com/marketplace/actions/gradle-wrapper-validation - # It ensures that the jar file is from gradle and not by a strange third party. - gradlevalidation: - name: "Validate Gradle Wrapper" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: gradle/wrapper-validation-action@v1