Skip to content

Commit

Permalink
python: github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
misodengaku committed Nov 8, 2023
1 parent 48121d1 commit 30c6b3a
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Python CI
on:
push:
branches: [main]
paths:
- bench/**/*
- webapp/python/**/*
- webapp/sql/**/*
- development/docker-compose-common.yml
- development/docker-compose-python.yml
- development/Makefile
- .github/workflows/python.yml
pull_request:
paths:
- bench/**/*
- webapp/python/**/*
- webapp/sql/**/*
- development/docker-compose-common.yml
- development/docker-compose-python.yml
- development/Makefile
- .github/workflows/python.yml
workflow_dispatch:
jobs:
test:
strategy:
matrix:
go:
- 1.21.1
name: Build
runs-on: [isucon13-ci-06]
steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
id: go

# to avoid error: Deleting the contents of '/home/ubuntu/actions-runner/_work/isucon13/isucon13'
# Error: File was unable to be removed Error: EACCES: permission denied, rmdir
# https://github.com/actions/checkout/issues/211
- name: chown workdir
run:
sudo chown -R $USER:$USER $GITHUB_WORKSPACE

- name: Check out code into the Go module directory
uses: actions/checkout@v3

# containers
- name: "setup containers"
working-directory: ./development
run: |
make down/python
make up/python
# bench
- name: "[bench] Get deps"
working-directory: ./bench
env:
TZ: Asia/Tokyo
run: |
go get -v -t -d ./...
- name: "[bench] Test"
working-directory: ./bench
env:
TZ: Asia/Tokyo
run: |
go clean -testcache
go test -p=1 -v ./...
- name: "run bench"
working-directory: ./bench
run: |
make bench

0 comments on commit 30c6b3a

Please sign in to comment.