Skip to content

Commit 98321a6

Browse files
test(ci): rename to test.yml + run on head sha (#640)
1 parent 82764e1 commit 98321a6

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/unit-tests.yml renamed to .github/workflows/test.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Unit Tests
1+
name: Tests
22

33
on:
44
push:
@@ -17,8 +17,11 @@ jobs:
1717
- uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
20+
ref: ${{ github.event.pull_request.head.sha }}
21+
2022
- name: Setup environment
2123
uses: ./.github/actions/setup-environment
24+
2225
- name: Run ATS and Tests
2326
uses: ./.github/actions/run-ats
2427
timeout-minutes: 15
@@ -48,10 +51,15 @@ jobs:
4851
name: "Codemod tests ${{matrix.size}}: Sync Graph=${{matrix.sync_graph}}"
4952
steps:
5053
- uses: actions/checkout@v4
54+
with:
55+
ref: ${{ github.event.pull_request.head.sha }}
56+
5157
- name: Setup environment
5258
uses: ./.github/actions/setup-environment
59+
5360
- name: Cache oss-repos
5461
uses: ./.github/actions/setup-oss-repos
62+
5563
- name: Run ATS and Tests
5664
uses: ./.github/actions/run-ats
5765
timeout-minutes: 15
@@ -66,11 +74,14 @@ jobs:
6674
GITHUB_WORKSPACE: $GITHUB_WORKSPACE
6775

6876
parse-tests:
69-
runs-on: ubuntu-latest-32
7077
if: contains(github.event.pull_request.labels.*.name, 'parse-tests') || github.event_name == 'push' || github.event_name == 'workflow_dispatch'
78+
runs-on: ubuntu-latest-32
7179
environment: parse-tests
7280
steps:
7381
- uses: actions/checkout@v4
82+
with:
83+
ref: ${{ github.event.pull_request.head.sha }}
84+
7485
- name: Setup environment
7586
uses: ./.github/actions/setup-environment
7687

@@ -91,10 +102,12 @@ jobs:
91102
-n auto \
92103
-o junit_suite_name="${{github.job}}" \
93104
tests/integration/codemod/test_parse.py
105+
94106
- uses: ./.github/actions/report
95107
with:
96108
flag: no-flag
97109
codecov_token: ${{ secrets.CODECOV_TOKEN }}
110+
98111
- name: Notify parse tests failure
99112
uses: slackapi/[email protected]
100113
if: failure() && github.event_name == 'push' && false
@@ -135,8 +148,12 @@ jobs:
135148
runs-on: ubuntu-latest-16
136149
steps:
137150
- uses: actions/checkout@v4
151+
with:
152+
ref: ${{ github.event.pull_request.head.sha }}
153+
138154
- name: Setup environment
139155
uses: ./.github/actions/setup-environment
156+
140157
- name: Test with pytest
141158
timeout-minutes: 5
142159
env:
@@ -147,6 +164,7 @@ jobs:
147164
-n auto \
148165
-o junit_suite_name="${{github.job}}" \
149166
tests/integration/codegen
167+
150168
- uses: ./.github/actions/report
151169
with:
152170
flag: integration-tests

0 commit comments

Comments
 (0)