Skip to content

Commit 1e26ffe

Browse files
authored
Update versioning information for dependencies, baseline & CI (#312)
* Update baseline: - Update FFI dependency * Remove version specification for FFI * Add repository for FFI * Reuse FFI spec BaselineOfCmfcmf [1] * Add Animations dependency to baseline * Document Metacello installation option * Change FFI version to stable * Use conditional FFI version for trunk/stable * Remove deprecated ci.yml * Use environment variables correctly * Improve debugging message for testAuthStateReady * Turn of debugging of CI-Release * Improve debugging message for testAuthStateIsAwaitingPhoneNumber * Remove errorneous prerelease setting * Increase timeouts for auth hander * Remove overriding of preferences * Increase timeouts again * Describe Metacello installation in README.md * Fix TCTLoggedInTests >> #testMessageSending by choosing arbitrary chat id * Switch test data for TCTTestCore again and make improve self-documentation+ * Simply triggers for CI-Lint as well * Use stable version for CI-Lint Resolves #312 (comment). * Fix release names See https://github.com/hpi-swa-teaching/TelegramClient/pull/312/files/d8e0ad4f526e25b7cd838f22de0d8a35bbc29542#r511866582 * Restriction CI actions to branches develop + master * Close #308 as requested in #312 (comment)
1 parent ae9fff2 commit 1e26ffe

File tree

19 files changed

+109
-157
lines changed

19 files changed

+109
-157
lines changed

.github/ci.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/ci-linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
matrix:
1818
os: [ ubuntu-latest ]
19-
smalltalk: [ Squeak64-5.2 ]
19+
smalltalk: [ Squeak64-5.3 ]
2020
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
2121
steps:
2222
- uses: actions/checkout@v2

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: CI
32

43
on:
@@ -15,9 +14,10 @@ jobs:
1514
build:
1615
runs-on: ${{ matrix.os }}
1716
strategy:
17+
fail-fast: false
1818
matrix:
1919
os: [ ubuntu-latest ]
20-
smalltalk: [ Squeak64-5.2 ]
20+
smalltalk: [ Squeak64-Trunk, Squeak64-5.3, Squeak64-5.2 ]
2121
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
2222
steps:
2323
- uses: actions/checkout@v2

.github/workflows/release-trunk.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
name: CI-Release
2-
on:
2+
on:
33
push:
4-
branches:
5-
- master
4+
branches: [master, develop]
65

76
jobs:
87
build:
98
runs-on: ${{ matrix.os }}
109
strategy:
1110
matrix:
12-
os: [ ubuntu-latest ]
13-
smalltalk: [ Squeak64-5.3 ]
11+
os: [ubuntu-latest]
12+
smalltalk: [Squeak64-5.3]
13+
env:
14+
prerelease: ${{ github.ref != 'refs/heads/master' }}
1415
name: ${{ matrix.smalltalk }} on ${{ matrix.os }}
1516
steps:
1617
- uses: actions/checkout@v2
@@ -23,18 +24,25 @@ jobs:
2324
uses: 1466587594/get-current-time@v1
2425
id: current-time
2526
with:
26-
format: YYYYMMDD-HH
27+
format: YYYYMMDD-HHmmss
2728
utcOffset: "+01:00"
29+
- name: Generate release name
30+
uses: haya14busa/action-cond@v1
31+
id: tag_prefix
32+
with:
33+
cond: ${{ env.prerelease }}
34+
if_true: "Trunk"
35+
if_false: ""
2836
- name: Create Release
2937
id: create_release
3038
uses: actions/create-release@v1
3139
env:
3240
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3341
with:
34-
tag_name: ${{ steps.current-time.outputs.formattedTime }}
35-
release_name: Release ${{ steps.current-time.outputs.formattedTime }}
42+
tag_name: ${{ steps.tag_prefix.outputs.value }}${{ steps.current-time.outputs.formattedTime }}
43+
release_name: ${{ matrix.smalltalk }} ${{ steps.current-time.outputs.formattedTime }}
3644
draft: false
37-
prerelease: false
45+
prerelease: ${{ env.prerelease }}
3846
- name: Upload Release Asset
3947
id: upload-release-asset
4048
uses: actions/upload-release-asset@v1

.squot

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OrderedDictionary {
2-
'packages/TelegramClient-Core.package' : #SquotCypressCodeSerializer,
3-
'packages/TelegramClient-Tests.package' : #SquotCypressCodeSerializer,
4-
'packages/BaselineOfTelegramClient.package' : #SquotCypressCodeSerializer,
5-
'packages/TelegramClient-UI.package' : #SquotCypressCodeSerializer
2+
'packages\/TelegramClient-Core.package' : #SquotCypressCodeSerializer,
3+
'packages\/TelegramClient-Tests.package' : #SquotCypressCodeSerializer,
4+
'packages\/BaselineOfTelegramClient.package' : #SquotCypressCodeSerializer,
5+
'packages\/TelegramClient-UI.package' : #SquotCypressCodeSerializer
66
}

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,26 @@ TelegramClient is a **Squeak-Client** for the widely used Telegram-Messenger. It
6666

6767
We currently only support Squeak 5.3.
6868

69+
### Option 1 (online installation)
70+
71+
Open a Workspace and evaluate the following command in it:
72+
```smalltalk
73+
Metacello new
74+
baseline: 'TelegramClient';
75+
repository: 'github://hpi-swa-teaching/TelegramClient/packages';
76+
load.
77+
```
78+
79+
### Option 2 (offline installation)
80+
6981
1. Install the following prerequisites:
7082
1. **Last compatible FFI version.** For Squeak version 5.3 use `Metacello new configuration: 'FFI'; load.` to install it.
7183
2. **JSON** package from [SqueakSource](http://www.squeaksource.com/JSON.html).
7284
3. **Animations** package [GitHub](https://github.com/hpi-swa/animations/).
7385

74-
2. Check our [release page](https://github.com/hpi-swa-teaching/TelegramClient/releases) for an online installer in the form of a sar file. Install this sar file in your Squeak image.
86+
2. Check our [release page](https://github.com/hpi-swa-teaching/TelegramClient/releases) for an online installer in the form of a SAR file. Install this SAR file in your Squeak image.
7587

76-
3. Click the Telegram entry in the Apps WorldMenu or execute the command `TCUTelegram newWithTCCCore`. The menu is only available if you already started the app once or installed the app via a release sar file.
88+
3. Click the Telegram entry in the Apps WorldMenu or execute the command `TCUTelegram newWithTCCCore`. The menu is only available if you already started the app once or installed the app via a release SAR file.
7789

7890
For further information or manual setup take a look in our [setup
7991
guide](https://github.com/hpi-swa-teaching/TelegramClient/wiki/Setup-Guide).
@@ -90,4 +102,4 @@ Pre-Releases are created automatically whenever a commit is added to the develop
90102

91103
## Our Group
92104

93-
Group 13 of the 2020 SWT I module included [Rohan Sawahn](https://github.com/rohansaw), [Jonas Schmidt](https://github.com/schmidtjonas), [Frederik Wollny](https://github.com/Freddy200), [Stefan Spangenberg](https://github.com/sspangenberg), [Lukas Laskowski](https://github.com/lasklu) and [Niklas Schilli](https://github.com/Mrnikbobjeff). Feel free to add your names to the list.
105+
Group 13 of the 2020 SWT I module included [Rohan Sawahn](https://github.com/rohansaw), [Jonas Schmidt](https://github.com/schmidtjonas), [Frederik Wollny](https://github.com/Freddy200), [Stefan Spangenberg](https://github.com/sspangenberg), [Lukas Laskowski](https://github.com/lasklu), and [Niklas Schilli](https://github.com/Mrnikbobjeff). Feel free to add your names to the list.
Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,33 @@
11
baseline
22
baseline: spec
3-
<baseline>
4-
spec
5-
for: #'common'
6-
do: [
7-
Preferences disable: #showDeprecationWarnings.
8-
spec
9-
baseline: 'SwaLint' with: [
10-
spec
11-
repository: 'github://hpi-swa-teaching/SwaLint:release/packages'];
12-
package: 'JSON' with: [
13-
spec
14-
file: 'JSON-ul.35';
15-
repository: 'http://www.squeaksource.com/JSON'];
16-
package: 'FFI-Pools' with: [
17-
spec
18-
file: 'FFI-Pools-eem.13';
19-
repository: 'http://source.squeakfoundation.org/FFI'];
20-
package: 'FFI-Kernel' with: [
21-
spec
22-
file: 'FFI-Kernel-nice.68';
23-
repository: 'http://source.squeakfoundation.org/FFI'];
24-
25-
package: 'TelegramClient-Core' with: [spec requires: #('libraries')];
26-
package: 'TelegramClient-UI' with: [spec requires: #('libraries')];
27-
package: 'TelegramClient-Tests' with: [spec requires: #('default' 'SwaLint')].
28-
29-
spec
30-
group: 'libraries' with: #('JSON' 'FFI-Kernel' 'FFI-Pools');
31-
group: 'default' with: #('TelegramClient-Core' 'TelegramClient-UI');
32-
group: 'tests' with: #('TelegramClient-Tests')].
3+
<baseline>
4+
5+
spec for: #common do: [
6+
spec
7+
baseline: 'Animations' with: [
8+
spec repository: 'github://hpi-swa/animations:master/repository'];
9+
project: 'FFI' with: [
10+
spec
11+
className: 'ConfigurationOfFFI';
12+
repository: 'http://www.squeaksource.com/MetacelloRepository';
13+
versionString: (SystemVersion current isAlpha
14+
ifTrue: [#development]
15+
ifFalse: [#stable]);
16+
loads: #('Core')];
17+
package: 'JSON' with: [
18+
spec file: 'JSON-ul.35';
19+
repository: 'https://www.squeaksource.com/JSON'];
20+
baseline: 'SwaLint' with: [
21+
spec repository: 'github://hpi-swa-teaching/SwaLint:release/packages'].
22+
23+
spec
24+
package: 'TelegramClient-Core' with: [
25+
spec requires: #('libraries')];
26+
package: 'TelegramClient-UI' with: [
27+
spec requires: #('libraries')];
28+
package: 'TelegramClient-Tests' with: [
29+
spec requires: #('default' 'SwaLint')].
30+
spec
31+
group: 'libraries' with: #('Animations' 'FFI' 'JSON');
32+
group: 'default' with: #('TelegramClient-Core' 'TelegramClient-UI');
33+
group: 'tests' with: #('TelegramClient-Tests')].

packages/BaselineOfTelegramClient.package/BaselineOfTelegramClient.class/methodProperties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"class" : {
33
},
44
"instance" : {
5-
"baseline:" : "N.S. 5/16/2020 17:20",
5+
"baseline:" : "ct 10/8/2020 01:55",
66
"postLoad" : "N.S. 5/14/2020 17:20" } }
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
running
22
setUp
33

4+
self timeout: 50 "seconds".
45
self core: TCTTestCore new.
5-
1 seconds wait.
6+
10 seconds wait.
67
self core authHandler isAuthorizationStateReady ifTrue: [self core authHandler logout.
7-
1 seconds wait.
8+
10 seconds wait.
89
self core: TCTTestCore new.
9-
1 seconds wait].
10+
10 seconds wait].
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
testing
22
testAuthStateIsAwaitingPhoneNumber
33

4-
self assert: self core authHandler isAwaitingPhoneNumber.
4+
self
5+
assert: self core authHandler isAwaitingPhoneNumber
6+
description: ['Auth state was ' , self core authHandler authState].

packages/TelegramClient-Tests.package/TCTAuthTests.class/instance/testAuthStateReady.st

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,7 @@ testing
22
testAuthStateReady
33

44
self core loginWithTestData.
5-
2 seconds wait.
6-
self assert: self core authHandler isAuthorizationStateReady.
5+
10 seconds wait.
6+
self
7+
assert: self core authHandler isAuthorizationStateReady
8+
description: ['Expected auth state ready but was ' , self core authHandler authState]

packages/TelegramClient-Tests.package/TCTAuthTests.class/methodProperties.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"instance" : {
55
"core" : "r.s 7/15/2020 12:39",
66
"core:" : "r.s 7/15/2020 12:39",
7-
"setUp" : "r.s 7/15/2020 19:25",
7+
"setUp" : "ct 10/8/2020 02:00",
88
"tearDown" : "r.s 7/15/2020 19:29",
9-
"testAuthStateIsAwaitingPhoneNumber" : "r.s 7/15/2020 19:24",
10-
"testAuthStateReady" : "r.s 7/15/2020 19:23" } }
9+
"testAuthStateIsAwaitingPhoneNumber" : "ct 10/8/2020 01:41",
10+
"testAuthStateReady" : "ct 10/8/2020 02:00" } }
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
running
22
setUp
33

4-
self timeout: 20.
4+
self timeout: 40 "seconds".
55
self core: TCTTestCore new.
6-
1 seconds wait.
6+
10 seconds wait.
77
self core authHandler isAuthorizationStateReady ifFalse: [
88
self core loginWithTestData.
9-
2 seconds wait].
9+
10 seconds wait].
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
testing
22
testLogout
33

4-
<timeout: 30 "seconds">
5-
64
self core authHandler logout.
75
10 seconds wait.
86
self assert: self core authHandler isAuthStateClosed.
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
testing
22
testMessageSending
33

4-
| testChatMessages |
5-
6-
self core sendMessage: 'TestMessage' to: self core loggedInUserID.
4+
| testChatId testChatMessages |
5+
6+
testChatId := self core chats first id. "Choose any available chat. The Telegram Test Data Center 'periodically wipe[s] all information stored. See TCTTestCore."
7+
8+
self core sendMessage: 'TestMessage' to: testChatId.
79
10 seconds wait.
8-
9-
testChatMessages := (self core chats getChat: self core loggedInUserID) messages.
10+
11+
testChatMessages := (self core chats getChat: testChatId) messages.
1012
self assert: (testChatMessages contains: [:aMessage |
1113
(aMessage message = 'TestMessage') and:
12-
(aMessage chatID = self core loggedInUserID)]).
14+
(aMessage chatID = testChatId)]).

packages/TelegramClient-Tests.package/TCTLoggedInTests.class/methodProperties.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"instance" : {
55
"core" : "r.s 7/15/2020 18:46",
66
"core:" : "r.s 7/15/2020 18:46",
7-
"setUp" : "js 8/1/2020 12:51",
7+
"setUp" : "ct 10/8/2020 01:59",
88
"tearDown" : "r.s 7/16/2020 16:54",
9-
"testLogout" : "ct 10/7/2020 20:20",
10-
"testMessageSending" : "r.s 7/16/2020 16:53" } }
9+
"testLogout" : "ct 10/8/2020 01:59",
10+
"testMessageSending" : "ct 10/22/2020 12:42" } }

0 commit comments

Comments
 (0)