-
Notifications
You must be signed in to change notification settings - Fork 5
145 lines (124 loc) · 4.64 KB
/
Copy pathvalidate.yml
File metadata and controls
145 lines (124 loc) · 4.64 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Validate workshop
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
content:
name: Content and site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 22
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- name: Validate lessons and site behavior
run: bash scripts/validate-workshop.sh content
smoke-build:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
env:
CARGO_TARGET_DIR: ${{ github.workspace }}/.cargo-target
strategy:
fail-fast: false
matrix:
include:
- language: dotnet
name: .NET smoke build
- language: nodejs
name: Node.js / TypeScript smoke build
- language: python
name: Python smoke build
- language: go
name: Go smoke build
- language: rust
name: Rust smoke build
- language: java
name: Java smoke build
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
if: matrix.language == 'dotnet'
with:
dotnet-version: 10.0.x
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
if: matrix.language == 'nodejs'
with:
node-version: 22
cache: npm
cache-dependency-path: |
start-intro/nodejs/package-lock.json
start-accessibility/nodejs/package-lock.json
start-museum/nodejs/package-lock.json
finished/nodejs/*/package-lock.json
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
if: matrix.language == 'python'
with:
python-version: "3.11"
cache: pip
cache-dependency-path: |
start-intro/python/requirements.txt
start-accessibility/python/requirements.txt
start-museum/python/requirements.txt
finished/python/*/requirements.txt
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
if: matrix.language == 'go'
with:
go-version: "1.24.x"
cache-dependency-path: |
start-intro/go/go.sum
start-accessibility/go/go.sum
start-museum/go/go.sum
finished/go/*/go.sum
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
if: matrix.language == 'rust'
with:
toolchain: "1.94.0"
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
if: matrix.language == 'rust'
with:
workspaces: |
start-intro/rust -> ../../.cargo-target
start-accessibility/rust -> ../../.cargo-target
start-museum/rust -> ../../.cargo-target
finished/rust/accessibility-report -> ../../../.cargo-target
finished/rust/hello-copilot-sdk -> ../../../.cargo-target
finished/rust/museum-exhibit-studio -> ../../../.cargo-target
- uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
if: matrix.language == 'java'
with:
distribution: temurin
java-version: "17"
cache: maven
- name: Verify Maven
if: matrix.language == 'java'
run: mvn --version
- name: Build ${{ matrix.name }}
run: bash scripts/validate-workshop.sh "${{ matrix.language }}"
macos-portability:
name: macOS portable validation
runs-on: macos-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0
with:
dotnet-version: 10.0.x
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.11"
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: "1.24.x"
- name: Validate with macOS system Bash
run: |
/bin/bash --version
/bin/bash scripts/validate-workshop.sh dotnet
/bin/bash scripts/validate-workshop.sh python
/bin/bash scripts/validate-workshop.sh go
test -z "$(git status --porcelain --untracked-files=all)"