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 new file mode 100644 index 0000000..d817ab2 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,33 @@ +name: Tests + +on: + push: + schedule: + - cron: '42 2 * * 1' # once a week + workflow_dispatch: + +jobs: + test: + strategy: + matrix: + os: + - ubuntu-latest + - macos-latest + - windows-latest + smalltalk: + - Squeak64-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 }} diff --git a/.project b/.project new file mode 100644 index 0000000..7c4006d --- /dev/null +++ b/.project @@ -0,0 +1,3 @@ +{ + 'srcDirectory' : 'src' +} 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 + } + } } 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/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 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