-
Notifications
You must be signed in to change notification settings - Fork 2
114 lines (109 loc) · 3.81 KB
/
ci.yml
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
name: CI
env:
NODE_VERSION: 18.x
PROXY: http://localhost:4873/
CIUSER: ci
CIEMAIL: [email protected]
CIPASS: dummycipassword
on:
push:
# Prevent duplicate runs of this workflow on our own internal PRs.
branches:
- main
- next/*
pull_request:
types: [opened, synchronize, reopened, labeled]
branches:
- main
- next/*
jobs:
bundles:
name: Check Bundles
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check Bundles
shell: bash
run: |
echo "Checking that all bundled tools are up to date..."
dirty_workspaces=()
for input_workspace in `find src -type d -mindepth 1 -maxdepth 1 -not -name node_modules` ; do
output_workspace=$(echo $input_workspace | sed -e 's/^src/pkgs/')
input_mtime=$(git log -1 --format=%ct $input_workspace)
output_mtime=$(git log -1 --format=%ct $output_workspace)
if [[ $input_mtime -gt $output_mtime ]] ; then
echo "❌ $input_workspace has changed since $output_workspace was last generated"
dirty_workspaces+=($input_workspace)
fi
done
if [[ ${#dirty_workspaces[@]} -gt 0 ]] ; then
echo
echo '💡 Re-run `npm run bundle` on the following workspaces before committing:'
for workspace in ${dirty_workspaces[*]} ; do
echo " • $workspace"
done
exit 1
fi
integration:
name: Integration Tests
needs: [bundles]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Dependencies
shell: bash
run: npm ci --verbose
- name: Build
uses: neon-actions/[email protected]
with:
working-directory: ./pkgs/cargo-messages
target: linux-x64-gnu
node-version: ${{ env.NODE_VERSION }}
use-cross: false
npm-publish: false
github-release: false
- name: Diagnostics
shell: bash
run: |
cd ./pkgs/cargo-messages/dist
ls -alF
- name: Start npm Proxy
shell: bash
run: ./proxy.sh
working-directory: ./test/integration/proxy
- name: Determine tarball
shell: bash
working-directory: ./pkgs/cargo-messages/dist
run: |
echo "cargo-messages-linux-x64-gnu-$(jq -r '.version' < ../package.json).tgz"
ls -l "cargo-messages-linux-x64-gnu-$(jq -r '.version' < ../package.json).tgz"
# - name: Publish @cargo-messages/linux-x64-gnu to proxy
# shell: bash
# working-directory: ./pkgs/cargo-messages/dist
# run: |
# npx npm-cli-adduser -u ${{env.CIUSER}} -p ${{env.CIPASS}} -e ${{env.CIEMAIL}} -r ${{env.PROXY}}
# npm publish --registry ${{env.PROXY}}
# - name: Publish cargo-messages to proxy
# shell: bash
# working-directory: ./pkgs/cargo-messages
# run: |
# npx npm-cli-adduser -u ${{env.CIUSER}} -p ${{env.CIPASS}} -e ${{env.CIEMAIL}} -r ${{env.PROXY}}
# npm publish --registry ${{env.PROXY}}
# - name: Publish @neon-rs/load to proxy
# shell: bash
# working-directory: ./pkgs/load
# run: |
# npx npm-cli-adduser -u ${{env.CIUSER}} -p ${{env.CIPASS}} -e ${{env.CIEMAIL}} -r ${{env.PROXY}}
# npm publish --registry ${{env.PROXY}}
# - name: Publish @neon-rs/cli to proxy
# shell: bash
# working-directory: ./pkgs/cli
# run: |
# npx npm-cli-adduser -u ${{env.CIUSER}} -p ${{env.CIPASS}} -e ${{env.CIEMAIL}} -r ${{env.PROXY}}
# npm publish --registry ${{env.PROXY}}