Repository navigation
58 lines (47 loc) · 1.7 KB
/
Copy pathbuild.yml
File metadata and controls
58 lines (47 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: CI-Pipeline
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09
with:
persist-credentials: false
- name: Set up .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1
with:
global-json-file: global.json
- name: Install Native AOT and Secret Service prerequisites
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends clang zlib1g-dev libsecret-1-0 gnome-keyring dbus
- name: Restore
run: dotnet restore FiscalApi.Cli.slnx
- name: Build
run: dotnet build FiscalApi.Cli.slnx -c Release --no-restore
- name: Test
env:
FISCALAPI_CLI_SECRET_SERVICE_TESTS: "1"
run: >-
dbus-run-session -- bash .github/scripts/with-test-secret-service.sh
dotnet test FiscalApi.Cli.slnx -c Release --no-build
- name: Publish Native AOT (linux-x64)
run: dotnet publish src/FiscalApi.Cli -r linux-x64 -c Release -o artifacts/linux-x64
- name: Smoke test
run: |
expected=$(grep -oPm1 "(?<=<Version>)[^<]+" src/FiscalApi.Cli/FiscalApi.Cli.csproj)
actual=$(./artifacts/linux-x64/fiscalapi --version)
if [ "$actual" != "$expected" ]; then
echo "::error::fiscalapi --version devolvió '$actual'; se esperaba '$expected'."
exit 1
fi
./artifacts/linux-x64/fiscalapi --help