-
-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (62 loc) · 1.97 KB
/
Copy pathtests.yaml
File metadata and controls
69 lines (62 loc) · 1.97 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
# Tests only run with --short, since the full tests involve downloading datasets
# and would be too costly for a GitHub actions.
# Locally in the development box it works because the datasets are cached.
name: "Tests" # The name of the workflow that will appear on GitHub
permissions:
# read|write|none
actions: read
checks: read
contents: write
deployments: read
# id-token: read --> doesn't work
issues: read
discussions: read
packages: read
pages: read
pull-requests: write
repository-projects: read
security-events: read
statuses: read
on:
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-24.04 # Rename to ubuntu-latest once the latest include GLIBC-2.38.
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.24.x"
- name: Install gopjrt shared libraries
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
go install github.com/gomlx/go-xla/cmd/gopjrt_installer@latest
sudo env GH_TOKEN=$GH_TOKEN $(go env GOPATH)/bin/gopjrt_installer -plugin linux -version latest -path /usr/local
- name: Test
run: |
go test ./...
- name: Commit README.md changes
if: github.ref == 'refs/heads/main'
run: |
if git diff --quiet -- 'README.md' ; then
echo "README.md not modified."
else
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "chore: Updated coverage badge."
fi
- name: Push Changes
if: github.ref == 'refs/heads/main'
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
branch: ${{ github.ref }}