generated from devcontainers/feature-starter
-
Notifications
You must be signed in to change notification settings - Fork 3
94 lines (87 loc) · 2.96 KB
/
test.yaml
File metadata and controls
94 lines (87 loc) · 2.96 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Tests
description: |
This workflow runs tests for devcontainer features and
creates a new release if changes are detected.
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
test-autogenerated:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
feature: ${{fromJson(vars.FEATURES_JSON)}}
base-image:
- archlinux:latest
- archlinux:base
- archlinux:base-devel
- archlinux:multilib-devel
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: "Setup Node.js"
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
- name: "Install Dependencies"
run: yarn install
- name: "Generating tests for '${{ matrix.feature }}' against '${{ matrix.base-image }}'"
run: make FEATURES=${{ matrix.feature }} BASE_IMAGE=${{ matrix.base-image }} test-autogenerated
test-scenarios:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
feature: ${{fromJson(vars.FEATURES_JSON)}}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: "Setup Node.js"
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
- name: "Install Dependencies"
run: yarn install
- name: "Generating tests for '${{ matrix.feature }}' scenarios"
run: make FEATURES=${{ matrix.feature }} test-scenarios
test-global:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: "Setup Node.js"
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
- name: "Install Dependencies"
run: yarn install
- name: "Testing global scenarios"
run: make test-global
release:
name: Release
if: ${{github.event_name == 'push' }}
needs: [test-autogenerated, test-scenarios, test-global]
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: package.json
cache: yarn
cache-dependency-path: yarn.lock
- name: Import GPG key
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- run: yarn install
- name: Run semantic-release
run: yarn run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}