trmnlp-test 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -1
  3. data/lib/trmnlp_test/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b926087a3c37b52ba542f1a113ea8e6d697e365bca15cc6d93c726328d21add1
4
- data.tar.gz: bc94fc2b7629eb445dc56ea6b7a45120805b51adc107a1606478447092aa5e16
3
+ metadata.gz: 2fd3a66c75500c0bc24d6d806d9815e88f85d402408ebb6a3589c38eb78dc90d
4
+ data.tar.gz: 30da50992764ab221d36f7958df6a7fd485bce1d7d4a74327fed4f47b28487cc
5
5
  SHA512:
6
- metadata.gz: 9b1010584fa48dbaa652a28d2d5ec434a4c7071d3b62832b739dbad9584b09c680275859943d0ee64e7ed0943e97b3efb001c46e21c5da3307f2095ea497adcf
7
- data.tar.gz: a144a37ba123e5bb7fb2aad230c8aebf17ba01bc5f2a79d454f670050fb359544f7339da7dce01fc8713df50ee637866feac39362c28cd24a81baf2338c8957c
6
+ metadata.gz: 5d76a1d40564a667b0af1890e7cba526ace90209825bf501677cff16761285dd9a0c8a28a2ef315a177df7ec08f94e69a9863d011773c2e3ad30f863bd6ed0ff
7
+ data.tar.gz: 26cc611c1a93437e073c858dcf02351e67e5e33138ecfeb2ddd18b74024d362d3fc88d5bbfaff3e838c8bb4fdf4b92857bea50a3373e4027798c0ca9cd92fd2d
data/README.md CHANGED
@@ -36,6 +36,23 @@ From a clone, `bin/trmnlp-test` builds the image from source on the newest trmnl
36
36
 
37
37
  Pushing to `main`, and a daily check for a new trmnlp release, publish the image as `:latest` and `:trmnlp-X.Y.Z`. Pushing a tag `vX.Y.Z` (matching `lib/trmnlp_test/version.rb`) runs the self-tests, publishes `:X.Y.Z` and pushes the gem through rubygems.org trusted publishing (no stored key).
38
38
 
39
+ ## GitHub Actions
40
+
41
+ ```yaml
42
+ # .github/workflows/trmnl-tests.yml (trmnlp-test init writes it)
43
+ name: trmnl tests
44
+ on: [push, pull_request]
45
+ jobs:
46
+ test:
47
+ runs-on: ubuntu-latest
48
+ steps:
49
+ - uses: actions/checkout@v4
50
+ - uses: ExcuseMi/trmnlp-test@v0
51
+ # with: { args: '--workers 2', directory: '.', report: 'test/trmnl-report', version: '', artifact: 'trmnl-report' }
52
+ ```
53
+
54
+ It installs the gem, caches `~/.cache/trmnlp-test`, runs the tests, writes a summary on the run page, adds annotations at the failing lines, and uploads the report with every device picture as the `trmnl-report` artifact. Commit PNG snapshots (`__screens__/`) so `toMatchScreen` has something to compare against.
55
+
39
56
  ## Config: `trmnlp-test.config.js`
40
57
 
41
58
  See [templates/trmnlp-test.config.js](templates/trmnlp-test.config.js). Transform dependencies:
@@ -68,7 +85,7 @@ test('menu', async ({ trmnl }) => {
68
85
  await expect(screen).toHaveNoOverflow();
69
86
  await expect(screen).toHaveNoOverlap('.title', 'img');
70
87
  await expect(screen).toShowText('Espresso'); // visible: not cut off by an ellipsis, clamp or the edge ({ visible: false }: content only)
71
- await expect(screen).toHaveQr('BCD\n002...');
88
+ await expect(screen).toHaveQr('BCD\n002...'); // black on white; { inverted: true | 'any' } for dark codes
72
89
  await expect(screen).toMatchScreen(); // PNG snapshot (--update-snapshots)
73
90
  await expect(screen).toFitDeviceImageLimit();
74
91
  const png = await screen.png(); // pixel(x,y), colors(), inkRatio(rect), inkBounds(), crop()
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TrmnlpTest
4
- VERSION = '0.1.5'
4
+ VERSION = '0.1.7'
5
5
  IMAGE = 'ghcr.io/excusemi/trmnlp-test'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trmnlp-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - ExcuseMi