From fd0cd0ab5f914db707e8cf77faa0bbee363c87bd Mon Sep 17 00:00:00 2001 From: Christoph Thiede Date: Fri, 3 Sep 2021 22:28:05 +0000 Subject: [PATCH 1/7] Delete travis and appveyor (both deprecated) --- .travis.yml | 10 ---------- appveyor.yml | 25 ------------------------- 2 files changed, 35 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 13925e8..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -sudo: false -language: smalltalk -smalltalk: - - Squeak64-trunk - - Squeak32-trunk - - Squeak64-5.2 - - Squeak32-5.2 -os: - - linux - - osx diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 5a2409c..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,25 +0,0 @@ -environment: - CYG_ROOT: C:\cygwin - CYG_BASH: C:\cygwin\bin\bash - CYG_CACHE: C:\cygwin\var\cache\setup - CYG_EXE: C:\cygwin\setup-x86.exe - CYG_MIRROR: http://cygwin.mirror.constant.com - SCI_RUN: /cygdrive/c/smalltalkCI-master/run.sh - matrix: - - SMALLTALK: Squeak64-trunk - - SMALLTALK: Squeak32-trunk - - SMALLTALK: Squeak64-5.2 - - SMALLTALK: Squeak32-5.2 - -platform: - - x86 - -install: - - '%CYG_EXE% -dgnqNO -R "%CYG_ROOT%" -s "%CYG_MIRROR%" -l "%CYG_CACHE%" -P unzip' - - ps: Start-FileDownload "https://github.com/hpi-swa/smalltalkCI/archive/master.zip" "C:\smalltalkCI.zip" - - 7z x C:\smalltalkCI.zip -oC:\ -y > NULL - -build: false - -test_script: - - '%CYG_BASH% -lc "cd $APPVEYOR_BUILD_FOLDER; exec 0 Date: Fri, 3 Sep 2021 22:28:25 +0000 Subject: [PATCH 2/7] Add GitHub action --- .github/workflows/tests.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..7967494 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,30 @@ +name: Tests + +on: [push, workflow_dispatch] + +jobs: + test: + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + smalltalk: + - Squeak64-trunk + - Squeak32-trunk + - Squeak64-5.3 + - Squeak64-5.2 + name: ${{ matrix.smalltalk }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - id: smalltalkci + uses: hpi-swa/setup-smalltalkCI@v1 + with: + smalltalk-image: ${{ matrix.smalltalk }} + - run: smalltalkci -s ${{ steps.smalltalkci.outputs.smalltalk-image }} + timeout-minutes: 15 + env: + # for uploading coverage reports + GITHUB_TOKEN: ${{ github.token }} From 84282bdb6d5e0d94d08739eae1c49dfb41cac18f Mon Sep 17 00:00:00 2001 From: Christoph Thiede Date: Fri, 3 Sep 2021 22:28:34 +0000 Subject: [PATCH 3/7] Configure coverage testing --- .smalltalk.ston | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.smalltalk.ston b/.smalltalk.ston index 63b2089..a9c8935 100644 --- a/.smalltalk.ston +++ b/.smalltalk.ston @@ -1,11 +1,18 @@ SmalltalkCISpec { - #loading : [ - SCIMetacelloLoadSpec { - #baseline : 'FileSystem', - #directory : 'src', - #load : [ 'tests' ], - #platforms : [ #squeak ], - #useLatestMetacello : true - } - ] + #loading : [ + SCIMetacelloLoadSpec { + #baseline : 'FileSystem', + #directory : 'src', + #load : [ 'tests' ], + #platforms : [ #squeak ], + #useLatestMetacello : true + } + ], + #testing : { + #packages : [ 'FS-Tests-*' ], + #coverage : { + #packages : [ 'FS-AnsiStreams', 'FS-Core', 'FS-Disk', 'FS-FileDirectory-Adapters', 'FS-Memory' ], + #format : #coveralls + } + } } From 51f806f67e3174023b3a420fd1e57ded5aea55fc Mon Sep 17 00:00:00 2001 From: Christoph Thiede Date: Fri, 3 Sep 2021 22:29:00 +0000 Subject: [PATCH 4/7] Add .project file for Metacello --- .project | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .project diff --git a/.project b/.project new file mode 100644 index 0000000..7c4006d --- /dev/null +++ b/.project @@ -0,0 +1,3 @@ +{ + 'srcDirectory' : 'src' +} From 03ed9aaed3675dcdf2ec9eec0fd590072caeccb9 Mon Sep 17 00:00:00 2001 From: Christoph Thiede Date: Fri, 3 Sep 2021 22:32:41 +0000 Subject: [PATCH 5/7] Remove 32-bit configuration from CI GitHub Actions does not support this at the moment, and it is unlikely that this will change in near future: https://github.com/actions/runner/issues/1181#issuecomment-880133607 --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7967494..5cf37be 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,6 @@ jobs: - windows-latest smalltalk: - Squeak64-trunk - - Squeak32-trunk - Squeak64-5.3 - Squeak64-5.2 name: ${{ matrix.smalltalk }} on ${{ matrix.os }} From 2e3ed3aa26bae3eb755ec15df26974e7dbb4965b Mon Sep 17 00:00:00 2001 From: Christoph Thiede Date: Fri, 3 Sep 2021 22:44:39 +0000 Subject: [PATCH 6/7] Add cron job for CI and notify community about failures --- .github/workflows/notify.yml | 25 +++++++++++++++++++++++++ .github/workflows/tests.yml | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/notify.yml diff --git a/.github/workflows/notify.yml b/.github/workflows/notify.yml new file mode 100644 index 0000000..043ac96 --- /dev/null +++ b/.github/workflows/notify.yml @@ -0,0 +1,25 @@ +name: Notify about failed build + +on: + workflow_run: + workflows: ["Tests"] + types: [completed] + +jobs: + notify: + name: 📣 Notify community on failure + if: ${{ github.event_name == 'schedule' && github.event.workflow_run.conclusion == 'failure' }} + runs-on: ubuntu-latest + steps: + - name: Send email on failure + if: ${{ github.event_name == 'schedule' && github.event.workflow_run.conclusion == 'failure' }} + uses: dawidd6/action-send-mail@v2 + with: + server_address: ${{ secrets.SMTP_SERVER }} + server_port: ${{ secrets.SMTP_PORT }} + username: ${{ secrets.SMTP_USERNAME }} + password: ${{ secrets.SMTP_PASSWORD }} + subject: GitHub Actions failed for ${{ github.repository }} + body: Build job of ${{ github.repository }} failed! See https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} for more information. + to: ${{ secrets.MAIL_RECEIVER }} + from: GitHub Actions diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5cf37be..d817ab2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,10 @@ name: Tests -on: [push, workflow_dispatch] +on: + push: + schedule: + - cron: '42 2 * * 1' # once a week + workflow_dispatch: jobs: test: From 0a95a988e6baf3309d7065f02e4b0ab3712de3c7 Mon Sep 17 00:00:00 2001 From: Christoph Thiede Date: Fri, 3 Sep 2021 22:52:26 +0000 Subject: [PATCH 7/7] Update badges in README.md --- README.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 5f41031..796978d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -# FileSystem [![Build Status][travis_badge]][travis] +# FileSystem + +[![Build Status][gha_badge]][gha_jobs] +[![Test coverage][coveralls_badge]][coveralls] + FileSystem is a Smalltalk API for accessing files and directories. This is an implementation for Squeak/Smalltalk. The FileSystem API was proposed as an alternative to the FileDirectory API for file system access in Squeak. It was first implemented as a library package for Squeak. Later it was adopted by Pharo as the main file system access library, while Squeak stayed with FileDirectory. @@ -16,10 +20,12 @@ Then, use the following snippet to load: ```smalltalk Metacello new - baseline: 'FileSystem'; - repository: 'github://squeak-smalltalk/squeak-filesystem:master/src'; - load. + baseline: 'FileSystem'; + repository: 'github://squeak-smalltalk/squeak-filesystem:master/src'; + load. ``` -[travis]: https://travis-ci.org/j4yk/Squeak-FileSystem -[travis_badge]: https://travis-ci.org/j4yk/Squeak-FileSystem.svg?branch=master +[gha_jobs]: https://github.com/squeak-smalltalk/Squeak-FileSystem/actions/workflows/tests.yml +[gha_badge]: https://github.com/squeak-smalltalk/Squeak-FileSystem/actions/workflows/tests.yml/badge.svg +[coveralls_badge]: https://coveralls.io/repos/github/squeak-smalltalk/Squeak-FileSystem/badge.svg +[coveralls]: https://coveralls.io/github/squeak-smalltalk/Squeak-FileSystem