Use runner temporary directory
This commit is contained in:
parent
8d9e2165e9
commit
4148335db1
13
.github/workflows/tests.yml
vendored
13
.github/workflows/tests.yml
vendored
@ -27,8 +27,8 @@ jobs:
|
|||||||
docker-options: -p 8080:80 -p 8081:5432 --expose 5432
|
docker-options: -p 8080:80 -p 8081:5432 --expose 5432
|
||||||
- name: SQLite
|
- name: SQLite
|
||||||
db-driver: sqlite
|
db-driver: sqlite
|
||||||
db-dsn: sqlite:/tmp/data/sqlite/ulogger.db
|
db-dsn: sqlite:${{ runner.temp }}/data/sqlite/ulogger.db
|
||||||
docker-options: -p 8080:80 -v /tmp/data:/data
|
docker-options: -p 8080:80 -v ${{ runner.temp }}/data:/data
|
||||||
env:
|
env:
|
||||||
DB_DSN: "${{ matrix.config.db-dsn }}"
|
DB_DSN: "${{ matrix.config.db-dsn }}"
|
||||||
DB_USER: ulogger
|
DB_USER: ulogger
|
||||||
@ -40,12 +40,9 @@ jobs:
|
|||||||
- name: Prepare for docker
|
- name: Prepare for docker
|
||||||
if: ${{ matrix.config.db-driver == 'sqlite' }}
|
if: ${{ matrix.config.db-driver == 'sqlite' }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install sqlite3
|
rm -rf ${{ runner.temp }}/data
|
||||||
rm -rf /tmp/data
|
mkdir -p ${{ runner.temp }}/data/sqlite ${{ runner.temp }}/data/uploads
|
||||||
mkdir -p /tmp/data/sqlite /tmp/data/uploads
|
sqlite3 -init scripts/ulogger.sqlite ${{ runner.temp }}/data/sqlite/ulogger.db .exit
|
||||||
sqlite3 -init scripts/ulogger.sqlite /tmp/data/sqlite/ulogger.db .exit
|
|
||||||
sudo chown -R runner /tmp/data
|
|
||||||
sudo chmod -R 777 /tmp/data
|
|
||||||
- name: Build docker
|
- name: Build docker
|
||||||
run: docker build -t ulogger --build-arg DB_DRIVER=${{ matrix.config.db-driver }} .
|
run: docker build -t ulogger --build-arg DB_DRIVER=${{ matrix.config.db-driver }} .
|
||||||
- name: Run docker
|
- name: Run docker
|
||||||
|
Loading…
x
Reference in New Issue
Block a user