-
Notifications
You must be signed in to change notification settings - Fork 15
45 lines (36 loc) · 1.44 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
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: CI
on:
workflow_dispatch: # 支持手动触发
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
id-token: write # 获取 oidc token 的权限
steps:
- name: get credentials
id: get-credentials
uses: aliyun/[email protected]
with:
role-to-assume: '${{ secrets.ROLE_ARN }}'
oidc-provider-arn: '${{ secrets.OIDC_ARN }}'
audience: 'actions.github.com' # default value
- name: Set up environment
run: |
echo "ALIBABA_CLOUD_ACCESS_KEY_ID=${{ steps.get-credentials.outputs.aliyun-access-key-id }}" >> $GITHUB_ENV
echo "ALIBABA_CLOUD_ACCESS_KEY_SECRET=${{ steps.get-credentials.outputs.aliyun-access-key-secret }}" >> $GITHUB_ENV
echo "ALIBABA_CLOUD_SECURITY_TOKEN=${{ steps.get-credentials.outputs.aliyun-security-token }}" >> $GITHUB_ENV
echo "odps_endpoint=${{ secrets.ENDPOINT }}" >> $GITHUB_ENV
echo "TZ=Asia/Shanghai" >> $GITHUB_ENV
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.15'
- name: Build
run: go build -v ./...
- name: Test (Expect Arrow Package)
run: go test -v $(go list ./... | grep -v './arrow')