Skip to content

Commit 27da66b

Browse files
authored
Install nFPM & manage the tool cache in bash (#199)
2 parents 8b7c59c + b576d85 commit 27da66b

34 files changed

Lines changed: 265 additions & 41783 deletions

.gitattributes

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

.github/dependabot.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: weekly

.github/dependabot.yml

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

.github/workflows/check-dist.yml

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

.github/workflows/ci.yml

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

.github/workflows/test.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: Run tests
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
test-action:
14+
name: Test Action on ${{ matrix.osname }}${{ matrix.arg }}
15+
runs-on: ${{ matrix.runner }}
16+
strategy:
17+
# Finish tests on all targets even once one of them fails.
18+
fail-fast: false
19+
matrix:
20+
id: [with-version, '']
21+
runner: [macos-latest, ubuntu-latest, windows-latest]
22+
include:
23+
- id: with-version
24+
arg: ' with version'
25+
- runner: macos-latest
26+
osname: macOS
27+
- runner: ubuntu-latest
28+
osname: Linux
29+
- runner: windows-latest
30+
osname: Windows
31+
32+
steps:
33+
- name: Checkout
34+
id: checkout
35+
uses: actions/checkout@v6
36+
37+
- name: Check nFPM is not yet installed
38+
run: |
39+
set -euxo pipefail
40+
41+
if command -v nfpm; then
42+
echo "nfpm appears to already be installed, so we can't test installing it." >&2
43+
exit 1
44+
fi
45+
shell: bash
46+
47+
- name: Test Local Action
48+
id: test-action
49+
if: matrix.id != 'with-version'
50+
uses: ./
51+
52+
- name: Test Local Action With Version
53+
id: test-action-with-version
54+
if: matrix.id == 'with-version'
55+
uses: ./
56+
with:
57+
version: 2.9.2
58+
59+
- name: Test nFPM executable
60+
env:
61+
NFPM_INSTALLED_VERSION: ${{ steps.test-action.outputs.version || steps.test-action-with-version.outputs.version }}
62+
run: |
63+
set -euxo pipefail
64+
65+
nfpm --version | tee output.txt
66+
67+
if ! grep -q "$NFPM_INSTALLED_VERSION" output.txt; then
68+
echo "nfpm --version output did not include $NFPM_INSTALLED_VERSION, the version we thought we installed." >&2
69+
exit 1
70+
fi
71+
shell: bash

.gitignore

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

.node-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)