-
-
Notifications
You must be signed in to change notification settings - Fork 143
64 lines (54 loc) · 2.09 KB
/
Copy pathtests.yml
File metadata and controls
64 lines (54 loc) · 2.09 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
name: tests
on:
pull_request:
push:
branches: [main]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Fetch base branch for changeset diff
if: github.event_name == 'pull_request'
run: git fetch origin ${{ github.base_ref }} --depth=1
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
cache: true
- name: Setup registries
run: |
echo -e "\n//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
echo -e "\n//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> ~/.npmrc
echo -e "\n//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
echo -e "\n//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Setup Aftman
uses: ok-nick/setup-aftman@v0.4.2
with:
version: 'v0.3.0'
token: ${{ secrets.GITHUB_TOKEN }}
cache: true
- name: Build all tools
run: pnpm -r --filter './tools/**' run build
- name: Install nevermore-cli locally
run: npm install --ignore-scripts -g .
working-directory: tools/nevermore-cli
- name: Run tests
id: run-tests
run: nevermore batch test --cloud --aggregated ${{ github.event_name == 'pull_request' && format('--base origin/{0}', github.base_ref) || '' }} --output test-results.json --yes --verbose --logs
env:
ROBLOX_OPEN_CLOUD_API_KEY: ${{ secrets.ROBLOX_UNIT_TEST_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build sourcemap for annotation resolution
if: always()
run: npm run build:sourcemap
- name: Post test results
if: always()
run: nevermore tools post-test-results test-results.json --yes --run-outcome ${{ steps.run-tests.outcome }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}