forked from soldair/node-qrcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create integration tests for the
qrcode
command line interface
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
qrcode-cli: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node: [ 18, 20, 22 ] | ||
fail-fast: false | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: install canvas dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev | ||
- name: npm ci | ||
run: npm ci | ||
|
||
- name: npm link | ||
run: npm link | ||
|
||
- name: qrcode terminal output | ||
run: qrcode "Lorem ipsum." | ||
|
||
- name: qrcode PNG output | ||
run: qrcode --output qrcode.png "Lorem ipsum." | ||
|
||
- name: upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: qrcode-cli_tests_nodejs_${{ matrix.node }} | ||
path: 'qrcode.png' | ||
compression-level: 0 |